Python Bindings for Qt (v3.2.4)

Phil Thompson

This document describes a set of Python bindings for the Qt widget set. Contact the author at .


Introduction

PyQt is a set of Python bindings for the Qt toolkit and available for all platforms supported by Qt, including Windows, Linux, UNIX and embedded systems such as the Sharp Zaurus and the Compaq iPAQ. They have been tested against Qt versions 1.43 to 3.0.4, Qt Non-commercial, Qtopia, and Python versions 1.5 to 2.2.1.

The bindings are implemented as a number of Python modules

PyQt also includes the pyuic PyQt code generator used as a backend for the Qt Designer GUI design tool.

Finally, PyQt also includes a debugger called eric.

Changes

The changes visible to the Python programmer in this release are as follows.

  • v3.2 of SIP is required. Starting with v3.1 the SIP run-time support library is implemented as a Python module and so is installed in a different place to earlier versions. You should manually remove any versions of the SIP run-time support library and header files earlier than v3.1.

  • Support for Qt's thread classes is now fully functional.

  • Any Python object can now be passed as the data element of a QCustomEvent.

  • A port to Python of the Qt semaphore example has been added. This is a good demonstration of Qt's threading classes and the use of custom events.

  • The Python object used to represent the C++ void * data type now allows easy conversions to and from integers. This makes it easier to pass such pointers between different Python modules.

  • The qt module now defines PYQT_VERSION as the PyQt version as a string.

  • The following missing methods have been added: QToolTip.enabled(), QToolTip.setEnabled() and QMainWindow.setDockWindowsMovable().

  • The following obsolete methods have been removed: QMainWindow.setToolBarsMovable().

  • The following classes have been added to the qtpe module: QPEMenuBar and QPEToolBar.