Sat. Dec 14th, 2019

Qt starts to support Python

2 min read

Well-known popular C++ common GUI development framework Qt officially announced that it supports Python in version 5.12. Python developers can now use all Qt APIs, although it is still in the technical preview stage, and, the official version will be launched soon.

Officials say Qt 5.12 will be the first version to support Python, and although Qt 5.12 is also a long-term supported version, the Python part won’t get long-term support together. Although the official hope that the part that supports Python can be released at the same time based on the Qt version, it is currently not possible.

This release contains two Python modules, PySide2 and Shiboken2. PySide2 provides a Python wrapper for most Qt APIs, while Shiboken allows users to wrap their own C++ libraries and develop Python applications. Internally, the PySide2 module relies on Shiboken. Currently, Qt 5.12 provides support for Python 2.7 and 3.5+ on three major desktop platforms.

Although there is a hint of compatibility guarantees in the future after the technical preview phase, Qt supports Python compatibility differently than C++ compatibility declarations. The former uses Qt’s C++ API with a special syntax, but any use of Qt 5.12 Applications that support Python should continue to be compatible with future versions. Officials say there is still room for improvement in Shiboken, so “Qt for Python” can’t take off the technical preview.

In the future, the government will continue to simplify the deployment of PySide2 applications, provide better interoperability with other Python modules, and support platforms such as embedded and mobile.