Alex Blasche

Qt for Python 5.12 Released

Published Tuesday December 18th, 2018
29 Comments on Qt for Python 5.12 Released
Posted in Announcements, Community, Contributors, Customers, Qt for Python

As mentioned in the Qt 5.12 release blog we finally reached the point that we can announce the first release of Qt for Python for Qt 5.12. As it has become custom for the project and expected by Python developers, you can install the release via:

pip install PySide2

Additionally, you can get the wheels from Qt’s official download server, or simply get the source code from our Git repository.

Note that Qt for Python is tightly bound to a particular Qt version and does not inherit the LTS (three years of support) flag from Qt 5.12. This means that this release is supported for one year starting on its release day. Our aim for the future is to release Qt for Python at the same time as the Qt version that Qt for Python is based on. Unfortunately, our release process has not reached this point quite yet.

To get started, take a look at the recent webinar ”Develop Your First Qt for Python Application’‘ on how to develop an application from scratch, based on Qt Widgets and different Python modules. You’ll also see some examples on how to continue developing with other Qt for Python components, such as QML and Shiboken.

PySide2 and Shiboken2

The release consists of two modules. The first module, PySide2, provides Python wrappers for most Qt APIs and the second module, Shiboken2, enables users to wrap their own C++ libraries and make them available to the Python world. Internally the PySide2 module depends on Shiboken.

As you might expect, dropping the Technology Preview (TP) label implies a certain compatibility guarantee. This compatibility statement is somewhat different for Qt for Python users compared to C++ guarantees though. It mostly relies on Qt’s source compatibility guarantee as we use a specific syntax to expose Qt’s C++ API. Any Python application written with Qt for Python 5.12 should continue to work with future releases. On the Shiboken side of things, we are still somewhat off target as we continue to carry the TP label.

When looking at the supported platforms, we currently support Python 2.7 and 3.5+ for the three major desktop platforms, with some limitations.

The Future of the Project

Our future roadmap is full of promising ideas and in January we’ll start sorting out the next steps, which will probably include:

  • Simplifying the deployment of PySide2 applications,
  • Provide a smoother interaction with other Python modules,
  • Support other platform like embedded and mobile,
  • and many others.

With this context in mind, we appreciate any input you may have for the next release. You can either post it here, in our IRC channel on Freenode (#qt-pyside) or directly to our issue tracker under .


Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Announcements, Community, Contributors, Customers, Qt for Python


Michael Herrmann Michael Herrmann says:

Congratulations to the team! Fantastic work.

Stefan says:

What about Python 2.7 on windows?

Cristián Cristián says:

Python 2.7 is built using MSVC2008, while Qt use MSVC2015/2017.

Patrick Stewart says:

That’s nowhere near as much of a problem as people make out. Look at pybind11 which works fine with 2.7 and can’t be compiled with old MSVC.

Cristián Cristián says:

Feel free to file a bug report or a suggestion if you consider it’s a situation that should be solved.

David says:

Will there be wheels for Raspberry Pi?

Cristián Cristián says:

Currently there is some research going on about this topic, so hopefully we can have an update soon.

Yann Lanthony says:

Thanks for the release!
Quick question: there is now a warning when using a constant Property in QML:

— MyObject.qml
class MyObject(QObject):
name = Property(str, getName, constant=True)

— main.qml
Label { text: } // MyObjectInstance exposed as a context property

QQmlExpression: Expression file:///main.qml depends on non-NOTIFYable properties: MyObject::name

This was not the case with previous PySide2 versions and does not seem to happen with Qt 5.12 in C++ .
Has something changed for declaring constant properties in PySide2?

Cristián Cristián says:

IIRC that was also on 5.11.2, which previous version are you referring to?
Even though is a warning, feel free to file a bug report so we can continue the discussion there.

Yann Lanthony says:

Thanks for your answer; I don’t get those warnings with 5.11.2 (and lower) and I’ve never had trouble using constant Qt properties on the QML side before (C++ or Python backend).
Yes, I’ll file a bug report even if it’s just a warning, since it differs from what’s happening using Qt C++ – and also it’s quite invasive when you have a lot of constant properties and they can’t be easily disabled via QQmlEngine.setOutputWarningsToStandardError(False).

SGag says:

Any support on creating Qt4Pytohn projects in QtCreator, please? Will there?

Alex Blasche Alex Blasche says:

Right now QtCreator support is limited to syntax highlighting courtesy to the language server support.
So far there was no need to have a project file as such as the usual build and deployment steps were not needed. However since deployment is the highest priority it may well create the need for a project file too.

Cristián Cristián says:

Just to add a few things to Alex’s comment, since LSP is still as an experimental feature you can try it out following these instructions:
You also get auto completion, type hinting, and warnings regarding some PEPs.

At the end of our last webinar, I showed the example on QtCreator, which also you can configure to run using the “play button”.

walter555 says:

Shouldnt it be called Qt 5.12 for Python? Because there is no Python 5.

Alex Blasche Alex Blasche says:

The product is called “Qt for Python”. Hence the version is attached to the end.

chr[] says:

This is great stuff!

KengoSawa2 says:

I was waiting for the release of PySide 2 5.12 for my product.
Everyone who decided to officially rebuild the PySide project is great.
The tool set of PySide 2 will be used for a long time.
I will do my best to get good feedback as well.

Dag says:

Congrats! What’s your thinking around deployment? Will the recommended way be using something like PyInstaller or something else?

Cristián Cristián says:

At the moment, yes we recommend PyInstaller.
We have done some research on it, and it seems to work out of the box for simple cases. We have found some issues when trying to pack resources files likes images, icons, ui files, etc, but nothing that a couple of lines of the code couldn’t solve.

At the moment we are still researching these aspects and hopefully we can make some statement next year.

Fif says:

I had an issue with PyInstaller – the bundled installer (.exe) couldn’t find the video file being referenced by QUrl.fromLocalFile() even though the file exists in the bundle, as added in the spec file. Any recommendations to fix this issue?

Jinming Chen says:

Hi, as for Qt 5.12, the Qt RemoteObjects has been in the Qt5Base module, but I could not find it in Qt for Python. So when will QtRO be available in Qt for Python?

Cristián Cristián says:

Qt Remote Objects is one of the things that is currently in our future feature list, so hopefully we can start some research on this topic soon.
It will be really nice if you can open a report with a use case on JIRA so we can test it out.

Ed says:

Why no official ruby support at the doors of 2019 ???
Come on guys…

PySimpleGUI says:

I upgraded yesterday to 5.12 and got crashes in PyCharm when I attempted to run in Debug-mode. DLL error when attempting to import. Had to downgrade to prior version.

Alex Blasche Alex Blasche says:

You are obviously on Windows. Would you be so kind and provide a crash report in such that we can address the issue? Any information related to the crash would be very helpful such as example code, wheel type you used, maybe stack trace, command line output etc.

Mark says:

This is great news!, thanks QT team/management. Keep up the great work!

bhagat says:

Is Pyqt Compatible With Linux Os?

a.atalla says:

Great news, i think next step should be better support in QtCreator … i wish

Commenting closed.

Get started today with Qt Download now