PyQt5 - Introduction


Advertisements

PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt was developed by RiverBank Computing Ltd. The latest version of PyQt can be downloaded from its official website − riverbankcomputing.com

PyQt API is a set of modules containing a large number of classes and functions. While QtCore module contains non-GUI functionality for working with file and directory etc., QtGui module contains all the graphical controls. In addition, there are modules for working with XML (QtXml), SVG (QtSvg), and SQL (QtSql), etc.

A list of frequently used modules is given below −

  • QtCore − Core non-GUI classes used by other modules

  • QtGui − Graphical user interface components

  • QtMultimedia − Classes for low-level multimedia programming

  • QtNetwork − Classes for network programming

  • QtOpenGL − OpenGL support classes

  • QtScript − Classes for evaluating Qt Scripts

  • QtSql − Classes for database integration using SQL

  • QtSvg − Classes for displaying the contents of SVG files

  • QtWebKit − Classes for rendering and editing HTML

  • QtXml − Classes for handling XML

  • QtWidgets − Classes for creating classic desktop-style UIs

  • QtDesigner − Classes for extending Qt Designer

Supporting Environments

PyQt is compatible with all the popular operating systems including Windows, Linux, and Mac OS. It is dual licensed, available under GPL as well as commercial license. The latest stable version is PyQt5-5.13.2.

Windows

Wheels for 32-bit or 64-bit architecture are provided that are compatible with Python version 3.5 or later. The recommended way to install is using PIP utility −

pip3 install PyQt5

To install development tools such as Qt Designer to support PyQt5 wheels, following is the command −

pip3 install pyqt5-tools

You can also build PyQt5 on Linux/macOS from the source code www.riverbankcomputing.com/static/Downloads/PyQt5

Advertisements