contains classes for displaying the contents of SVG files. It supports the static features of SVG 1.2 Tiny. The QtXml module implements SAX and DOM interfaces to Qt's XML parser. The QtMultimedia module implements low-level multimedia functionality. Application developers would normally use the phonon module. The QtDesigner module contains classes that allow Qt Designer to be extended using PyQt. The Qt module consolidates the classes contained in all of the modules described above into a single module. This has the advantage that you don't have to worry about which underlying module contains a particular class. It has the disadvantage that it loads the whole of the Qt framework, thereby increasing the memory footprint of an application. Whether you use this consolidated module, or the individual component modules is down to personal taste. The uic module implements support for handling the XML files created by Qt Designer that describe the whole or part of a graphical user interface. It includes classes that load an XML file and render it directly, and classes that generate Python code from an XML file for later execution. PyQt5 contains the following Python modules: QtQml Module QtQtuick Module QtCore Module QtGui Module QtPrintSupport Module QtWidgets Module QGLContext Module QGLFormat Module QGLWidget Module QtWebKit Module QtWebKitWidgets Module Versions PyQt version 4 works with both Qt 4 and Qt 5. PyQt version 5 only supports Qt version 5, and drops support for features that are deprecated in Qt 5. Hello World example The below code shows a small window on the screen. PyQt4 #! /usr/bin/env python3 # Character Encoding: UTF-8 # # Here we provide the necessary imports. # The basic GUI widgets are located in QtGui module. import sys from PyQt4.QtGui import QApplication, QWidget # Every PyQt4 application must create an application object. # The application object is located in the QtGui module. app = QApplication(sys.argv) # The QWidget widget is the base class of all user interface objects in PyQt4. # We provide the default constructor for QWidget. The default constructor has no parent. # A widget with no parent is called a window. root = QWidget() root.resize(320, 240) # The resize() method resizes the widget. root.setWindowTitle("Hello, World!") # Here we set the title for our window. root.show() # The show() method displays the widget on the screen. sys.exit(app.exec_()) # Finally, we enter the mainloop of the application. PyQt5 #! /usr/bin/env python3 # Character Encoding: UTF-8