Skip to main content

Qt for Python release: 6.11 is out!

Comments

During the past months, most members of the Qt for Python have been working on simplifying the interaction between Python and Qt under the Qt Bridges projects, so our efforts have been focused on that rather than adding more features to Qt for Python.

Most of the work we need to do for each release is to catch up with all the updates from Qt/C++ so we can bring that functionality to all PySide users.

As a reminder for Visual Studio Code users, back in February the team behind the plugins development released an extension for Qt for Python. Did you check it out?

The following is a short list of topics that we are including in this release, but also things that are currently under development:

Moving forward with Python

The 6.11.0 release has raised the Python version to 3.10, to drop many things that were still around only to make 3.9 work, but more importantly to use newer features from the Python releases. Internally, we have dropped many helper functions that remain for compatibility wand now can be replaced with the Python C-API.

We continue our research in order to bring better performance to Qt for Python applications ( Free Threaded Python ). So far, we have been still making small changes to improve the scenario due to the complexity of handling our own locking mechanism in the full framework to prevent the Qt event loop for the Python threads. Many people have been requesting this assuming that performance will come for free, but contrary to that belief, keep in mind that UI interactions are not something that can be optimized; and most of the performance bottle necks you might have in your Python application can still be solved by other modules and even the creation of ad-hoc extensions.

We also investigated the Subinterpreter approach, but we concluded that this is not feasible for Qt for Python.

Type hints is another topic that has been in progress for a long time, and we have manage to reduce more and more the amount of issues that have been reported, so in case you have seen some issues, we ask for your help by submitting a bit report so we can keep improving our Python stubs!

Catching up with Qt

As you saw in the general announcement, we also are providing bindings for the new Qt Canvas Painter module, which is a new module with imperative 2D graphics rendering capabilities built on top of Qt’s Rendering Hardware Interface (RHI).

We also updated our support for pyproject.toml so people could handle options for pyside6-uic and pyside6-rcc tools, since we got a report regarding aggressive compression that was disrupting the usage of some resources on some platforms.

Similarly, pyside6-designer got new functionality to display Python help documentation within the same interface.

Keeping our binding generator updated

Shiboken, our binding generator, also has been getting a lot of improvements, and the major one regarding structure is that we finally decoupled the generator from the helper module, mostly motivated for some cross compilation capabilities, and for a future of improving our build system. This will also help people packaging PySide for different platforms.

Since Python keeps evolving, so does C++. With C++20 we have spent lots of time providing support for synthesizing comparison operators, for example we needed to ignore non-homogeneous reverse free comparison operators, due to many warnings about unmatched comparison operators' modifications.

Considering some errors coming from different places while generating bindings, we have add more information to the messages, to identify easily where they come from, and also we have been working on to her minor issues like the possibility to convert null smart pointers to None, improving the keyword arguments passes to base classes when using multiple-inheritance, and other minor fixes.

What’s next?

We haven’t forgotten the interest of many people for us to provide iOS support, so that’s a topic we recently restarted thanks to the contributions of Patrick Stinson! So, we really hope to get news soon!

Similarly, there have been a couple of other projects we have paused in the past months like the Qt Python Scripting project to enable dynamic bindings within C++ code, improvements in our build infrastructure, updating our deployment tool, and better integration with QtQuick. We hope to have news in the coming releases, so stay tuned!

Let's stay in touch!

We want to keep trying new experimental support, features, and Python module integration. What should we do next? Drop us a message or open a suggestion on JIRA 👍.

We hope you enjoy the release, and as always, drop by our community platforms and let us know if something is not properly working by opening bug reports.

Comments

Subscribe to our blog

Try Qt 6.11 Now!

Download the latest release here: www.qt.io/download

Qt 6.11 is now available, with new features and improvements for application developers and device creators.

We're Hiring

Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.