Python Bindings for Qt (v3.1)

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. They have been tested against Qt versions 1.43 to 3.0.3, Qt Non-commercial, Qtopia (for Qt/Embedded) and Python versions 1.5 to 2.2.

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.1 of SIP is required. This version is implemented as a Python module and so is installed in a different place to previous versions. You should manually remove any previous versions of the SIP run-time support library and header files.

  • PyQt has been ported to Qt/Embedded.

  • The qtpe module has been added which includes classes in the Qt Palmtop Environment (aka Qtopia). Currently only the QPEApplication class has been implemented which is sufficient to allow applications to integrate properly with Qtopia.

  • Support for Qt's threads has been added: QApplication.lock(), QApplication.locked(), QApplication.tryLock(), QApplication.unlocked(), and the QMutex, QSemaphore, QThread and QWaitCondition classes.

  • The following internal Qt classes have been removed: QDateTimeEditBase and QDragResponseEvent.

  • The following Qt classes have been added: QImageTextLangKey and QValueList<QImageTextLangKey>.

  • The following missing methods have been added: QActionGroup.add(), QActionGroup.addSeparator(), QImage.dotsPerMeterX(), QImage.dotsPerMeterY(), QImage.offset(), QImage.setDotsPerMeterX(), QImage.setDotsPerMeterY(), QImage.setOffset(), QImage.setText(), QImage.text(), QImage.textKeys(), QImage.textLanguages(), QImage.textList() and QPixmap.grabWidget().

  • The dragdrop example script, contributed by Issac Trotts was added.