PyQt vs PySimpleGUI
When comparing PyQt vs PySimpleGUI, the Slant community recommends PyQt for most people. In the question“What are the best Python GUI frameworks/toolkits?” PyQt is ranked 2nd while PySimpleGUI is ranked 4th. The most important reason people chose PyQt is:
PyQt has a straightforward API with its classes corresponding to Qt C++’s, and as such, the API documentation for C++ works for Python — the namespaces, properties, methods are all the same. If you have experience working with Qt and/or C++, you will find PyQt easy to work with.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro API is easy to grasp for someone with a Qt/C++ background
PyQt has a straightforward API with its classes corresponding to Qt C++’s, and as such, the API documentation for C++ works for Python — the namespaces, properties, methods are all the same. If you have experience working with Qt and/or C++, you will find PyQt easy to work with.
Pro Stability
PyQt is used in many large-scale applications and has stood the test of time.
Pro Signal/slot mechanism allows for code flexibility
GUI programming with Qt is built around the concept of signals and slots for communication between objects. A signal is emitted when an event occurs (e.g. a button is clicked), and slots are callable functions that handle the event (e.g. show a pop-up, when a button is clicked). This allows for flexibility when handling GUI events and results in a cleaner codebase.
Pro Many native widgets (UI components) available
Qt provides many widgets (buttons, textboxes, menus, et al.) out of the box, and they have a native look to them across all supported platforms: the same widget looks similar to the platform's native widget (e.g. a button in a PyQt application looks the same as a button on macOS, or Windows). On Linux systems, it changes according to the desktop environment.
Pro WYSIWYG interface builder available
PyQt has support for loading UIs built with Qt Designer, a drag-and-drop WYSIWYG interface builder, which allows you to design and build interfaces without writing any code.
Pro Many learning resources available
PyQt is one of the most popular UI frameworks for Python. It has an active community with many third-party code examples and tutorials available.
Pro More than just a GUI framework
Qt wraps several native platform APIs for networking, databases, etc. and provides standardized access to them through a single API — one codebase can cater to many platforms and perform the same across them.
Pro Extremely easy to learn, compared to other GUI
Python GUI For Humans - Transforms tkinter, Qt, Remi, WxPython into portable people-friendly Pythonic interfaces.
- Requires 1/2 to 1/10th the amount of code as underlying frameworks.
- One afternoon is all that is required to learn the PySimpleGUI package and write your first custom GUI.
- Students can begin using within their first week of Python education.
- No callback functions. You do not need to write the word "class" anywhere in your code.
"I've been working to learn PyQT for the past week in my off time as an intro to GUI design and how to apply it to my existing scripts... Took me ~30 minutes to figure out PySimpleGUI and get my scripts working with a GUI."
"Python GUI has been an absolute nightmare for me and I've avoided it like the plague. Until I saw PysimpleGUI."
"I've been pretty amazed at how much more intuitive it is than raw tk/qt. The dude developing it is super active on the project too so if you come across situations that you just can't get the code to do what you want you can make bug/enhancement issues that are almost assured to get a meaningful response."
"This library is the easiest way of GUI programming in Python! I'm totally in love with it"
"Wow that readme is extensive and great." (hear the love for docs often)
"Coming from R, Python is absolutely slick for GUIs. PySimpleGUI is a dream."
"I have been writing Python programs for about 4 or 5 months now. Up until this week I never had luck with any UI libraries like Tkinter, Qt, Kivy. I went from not even being able to load a window in Tkinter reliably to making a loading screen, and full program in one night with PySimpleGUI."
"I love PySimpleGUI! I've been teaching it in my Python classes instead of Tkinter."
Pro Single file
Either pip install or copy single source file to your project.
Pro Run PySimpleGUI code on multiple GUI Frameworks by changing 1 line of code
The same PySimpleGUI code written by the user can be executed on multiple GUI platforms without changing the source code. Only the import statement needs to be changed. Write the GUI once, run on multiple platforms including a web browser
- Create windows that look and operate identically to those created directly with tkinter, Qt, WxPython, and Remi.
Pro No package dependencies other than tkinter
Wraps tkinter and does not require any other packages be installed.
Pro Easy and comprehensive documentation, tutorials, example code and videos
300+ Demo Programs teach you how to integrate with many popular packages like OpenCV, Matplotlib, PyGame, etc.
Tons of documentation, a Cookbook, built-in help using docstrings - in short, it's heavily documented.
Pro Open source
Pro Highly customizable
Pro Multi-platform support
Python code with GUI will run on Windows, Linux, Raspberry Pi and Android (PyDroid3) with very minor changes. one to 4 lines of boilerplate type code.
Pro Supports both Python 2.7 and Python 3
Pro Uses Python language constructs cleverly
PySimpleGUI leverages the Python language constructs in clever ways that shorten the amount of code and return the GUI data in a straightforward manner. When a widget is created in a form layout, it is configured in place, not several lines of code away.
With most GUIs, arranging GUI widgets often requires several lines of code… at least one or two lines per widget. PySimpleGUI uses an "auto-packer" that automatically creates the layout. No pack or grid system is needed to lay out a GUI window.
What makes PySimpleGUI superior for newcomers is that the package contains the majority of the code that the user is normally expected to write. Button callbacks are handled by PySimpleGUI, not the user's code. Beginners struggle to grasp the concept of a function, and expecting them to understand a call-back function in the first few weeks is a stretch.
Pro Updated frequently
New releases, new Demo Programs, documentation, online resources as constantly being added.
Pro Udemy Course
Has a 61 lecture course on Udemy now that's got more than the free older courses on YouTube.
Cons
Con Steep learning curve
It can take a while to get productive with PyQt. It is a huge framework and there are many ways to implement different things, some of them are conflicting and might be confusing to the unfamiliar.
Con Paid license required if your application is not "free as in speech"
PyQt is dual-licensed with GPL v3 and the Riverbank Commercial License. If you do not intend on releasing your application under a GPL-compatible license (i.e. make your application open-source), you must pay for a commercial license.
Con No Python-specific documentation on classes in PyQt5
PyQt5's documentation links to its Qt counterpart, which is in C++. This can be confusing for someone without a background in C++ or experience with Qt.
Con Bad dev attitude
Con Non pythonic
Con Bad documentation
The documentation has no structure, is very messy and is based on a case-by-case usage instead of explaining how the lib works.