PyQt is a module to make desktop software with Python. This works on all desktop systems including Mac OS X, Windows and Linux.

If you want to make desktop apps with Python, PyQt is the module you need to make them. After creating your app, you can create an installation program with fbs.

Related Course: Create GUI Apps with Python PyQt5

pyqt window with buttons


What is PyQt?

PyQt is a port of the Qt library (C++). Qt is a very powerful GUI library. PyQt is not a single module, but a collection of modules.

These modules include:
QtCore, QtGui, QtWidgets, QtMultimedia, QtBluetooth, QtNetwork, QtPositioning, Enginio, QtWebSockets, QtWebKit, QtWebKitWidgets, QtXml, QtSvg, QtSql and QtTest.

So what’s in these modules?

  • Qtcore contains the core non-GUI code.

  • QtGui has everything for window management like event handling and graphics.

  • QtWidgets has a many UI widgets like buttons, labels, textinput and other things you’d see in a desktop window.

  • QtMultimedia for multimedia content and camera.

  • QtBluetooth scan bluetooth devices and connect.

  • QtNetwork a cross-platform solution for network programming. Set up a socket server or client that works on all desktop systems. Supports both the TCP/IP stack and UDP.

  • QtPositioning determine a position by using a position (WiFi, Satellite)

  • QtWebSockets implementation of the websocket protocol.

  • QtWebKit web browser implementation. You can use this to render a webpage. This is based on WebKit2. WebKit is used in the Safari browser, by KDE and others.

  • QtWebKitWidgets Deprecated. WebKit1 version of web browser implementation

  • QtXml use XML files, reading/writing and so on.

  • QtSvg svg graphics (Scalable Vector Graphics (SVG). A type of image format.

  • QtSql work with databases.

  • QtTest unit testing

If you are new to Python PyQt, then I highly recommend this book.

Installing PyQt

You can easily make desktop software with PyQt. There are two ways to install PyQt: with an installer and from code.

Compling PyQt from source can be a tedious process, recommend you to install using the installer or package manager. (an end-user can simply run a setup program to install your software)

You can view the tutorial on PyQt installation.

Creating Apps

After PyQt is installed, you can create all kind of desktop software. PyQt has many widgets including buttons, input fields, combobox, webview and tons of others.

This is straightforward and you will learn how to do that in the next tutorials.

Related Course: Create GUI Apps with Python PyQt5