PyQt is a Python binding to the popular cross-platform Qt application framework commonly used to make graphical applications. PyQt4 supports Qt4 and PyQt5 supports Qt5. It runs on all platforms supported by Qt (Windows, OS X, Linux, iOS and Android). The bindings are implemented as a set of Python modules and classes.
For more information see the PyQt website.
While some parts of the Qt framework are thread safe, much of it is not. The Qt C++ documentation provides a good overview of which classes are reentrant (can be used to instantiate objects in multiple threads). The following rules are the most widely sought:
QWidget
or similar).QObject.moveToThread()
if you need to move a Qt object from one thread to another (does not apply to Qt GUI objects which must always remain in the main thread). But note that the object must not have a parent.As per this Stack Overflow QA, it is not recommended to use Python threads if your thread intends to interact with PyQt in any way (even if that part of the Qt framework is thread safe).