Getting to Know PyQt
00:00 Getting to Know PyQt PyQt is a Python binding for Qt, which is a set of C++ libraries and development tools, providing platform independent abstractions for graphical user interfaces known as GUIs.
00:16 Qt also provides tools for networking, threads, regular expressions, SQL databases, SVG, OpenGL, XML, and many other powerful features. In this course, you’ll be using PyQt 6 as this is the current version of the library.
00:32 So any reference to PyQt is a reference to PyQt 6.
00:38 PyQt is based on Qt version 6. So it provides classes for the many technologies which are available in Qt. PyQt 6 implements bindings for many of the Qt classes in a set of Python modules, which are organized in a top level Python package called PyQt 6.
00:56 For the current version of PyQt 6 to work, you’ll need Python 3.8 or later. PyQt 6 is compatible with Windows, Unix, Linux, macOS, iOS, and Android. This is an attractive feature if you’re looking for a GUI framework to develop multi-platform applications that have a native look and feel on each platform.
01:19 It’s available under two licenses, the Riverbank commercial license, and the General Public License version three. Your PyQt 6 license must be compatible with your Qt license.
01:31 If you use the GPL license, then your code must also use a GPL-compatible license. If you want to use PyQt 6 to create a commercial application, then you need a commercial license for your installation.
01:45 Note that the Qt company has developed and currently maintains its own Python binding for the Qt library. This is called Qt for Python and is the official Qt for Python.
01:56 Its Python package is called PySide.
02:00 PyQt and PySide are both built on top of Qt. The APIs are quite similar because they reflect the Qt API. Porting PyQt code to PySide can be as simple as updating some imports.
02:13 If you learn one of them, then you should be able to work with the other with minimal effort. If you want to dive deeper into the differences between these two libraries, then check out the link seen on screen.
02:27 And if you need more information about PyQt 6 licensing, then check out this link on the project’s official documentation.
02:36
As you progress throughout this course, you’ll notice that PyQt’s API doesn’t follow PEP 8 coding style and naming conventions. PyQt is built around Qt, which is written in C++, and therefore uses the CamelCase
naming style for functions, methods, and variables.
02:54 When you start writing a PyQt project, you’ll need to decide which naming style you’ll use. On screen you can see what PEP 8 has to say about this.
03:05 And in addition, the Zen of Python says that practicality beats purity. If you want to write consistent PyQt-related code, then you should stick to the framework’s coding style.
03:16
So in this course, that’s what you’ll be following by using CamelCase
instead of the usual Python snake case.
03:23 So with that information out of the way, in the next section of the course, you’ll take a look at installing PyQt.
Become a Member to join the conversation.