When comparing Tkinter vs PyQt, the Slant community recommends PyQt for most people. In the question“What are the best Python GUI frameworks/toolkits?” PyQt is ranked 2nd while Tkinter is ranked 3rd. 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.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Free for commercial use
Pro Included in the standard Python library
You probably already have it, since it's included in the standard Python distributions.
Pro Easy to learn and get productive with
TkInter is a small library with a gentle learning curve compared to what’s out there. It has a straightforward API and is often the go-to choice for building quick GUIs for Python scripts.
Pro Building executables is less complicated
Compared to other GUI libraries, building executables for TkInter applications are simpler because TkInter is included in Python and has no other dependencies. This results in less complicated packaging requirements and smaller binary size.
Pro Fast
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.
Cons
Con No advanced widgets
TkInter does not come with advanced widgets out of the box (e.g. date picker).
Con Not good looking
You need a lot of code to make it look good.
Con No reliable UI builder available
There is no tool in the same league as Qt Designer (PyQt) for TkInter.
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.