Harald Kjølberg

Qt for Python is coming to a computer near you

Published Friday April 13th, 2018
37 Comments on Qt for Python is coming to a computer near you
Posted in Qt for Python

Some of you – ok, probably most of you – know that Qt is a great C++ framework, enabling developers to create magnificent user interfaces with technologies like QML, Qt Quick Controls, and Qt Widgets. I will further claim that no one is knocked out of their socks when I say that C++ is one of the most widely used programming languages in the world today. The fact that Python is one of the fastest growing programming languages, measured in popularity, is probably also old news in most communities. So, what’s this blog post all about? Well, give it two more minutes.

C++ and Python are both great programming languages, but they are great in different leagues. C++ is the Star Destroyer of the programming universe; it can destroy all your problems, or it can turn out to be your biggest problem if you’re not friendly with it. Therefore it’s sometimes convenient to go for the Millennium Falcon of programming languages, Python. It can easily be maneuvered by anyone, princesses and smugglers alike, and it will get you from Alderaan to Yavin at light speed. And, whether you have taken the entire crew out in the Star Destroyer or blitzing around in The Millennium Falcon, you would like to have a neat user interface. That’s where you need Qt, the R2-D2 of the programming universe, connecting to both Star Destroyer and the Millennium Falcon.

PySide2 – the bindings from Python to Qt – changes skin this spring. We have re-branded it as Qt for Python on a solution level, as we wanted the name to reflect the use of Qt in Python applications. Under the hood it is still PySide2 – just better. While most of us have been idling around – thinking of names, logos, and marketing – a great team of developers has worked hard to bring the actual solution to you. Pretty soon, developers can enjoy all the goodies from Qt in their Python applications, including official technical support, around the globe. Our hope is that Qt for Python will bring Qt to new places, new developers; and new heights.

Qt for Python will be released as a Technology Preview shortly after the Qt 5.11 release as that’s the official Qt version of the first Qt for Python release. We know that many of you are eager to get started – check out the latest snapshots: http://download.qt.io/snapshots/ci/pyside or contact us to kickstart your development project now.

More blog posts will follow in the weeks to come, so stay tuned for more scrumptious details on the technical aspects and features.

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

Posted in Qt for Python


Jeff Tranter says:

There was discussion a few months back that the license had not been finalized. Can you confirm that it will be LGPL (as well as GPL and commercial)?

Harald Harald says:

Yes. Qt for Python will have the same licensing as Qt for Application Development, i.e. it will be available under GPL, LGPL and commercial.

Elvis Stansvik says:

Cool, will definitely check it out.

Why cp34 wheels but no cp35 wheels though? I think a lot of people will be on Ubuntu 16.04 LTS for quite a while longer, which has Python 3.5.

Alex Blasche Alex Blasche says:

Qt for Python will use Python’s Stable ABI and hence 3.4, 3.5 and 3.6 versions can be addressed using the same wheel.

lihs says:

PySide is not stable than PyQt and also Pyside release cycle is too long , As a developer we expect a stable and active developped pyside .

Cristián Cristián says:

There is a group of developers at The Qt Company that are in charge of this project now, so once the technical preview is out, you can expect a more stable and active development.

Philip says:

It is not much competitive to PyQt besides license unless we could develop Android/iOS app EASILY using PySide2

Vincent says:

Can we install it by online installer?

Alex Blasche Alex Blasche says:

No, it won’t. It uses Python’s package management (pip) and we will release by pushing wheels. Most likely the Qt Account will provide wheels for download as well (like the current snapshot process: http://download.qt.io/snapshots/ci/pyside/5.11/latest/pyside2/)

steve says:

Interesting. Although I am not clear on how this will be ultimately packaged? Is it adding Qt support to Python, or delivering Python as part of the Qt package (like QML)… or something else?

Cristián Cristián says:

Qt for Python is a set of bindings that will expose the Qt API to Python. You will have access to all the Qt classes, including QML. The packaging process is just as any Python module, through wheels.

Michael Ji says:

Is this the first persion to replay this great news?

lasith hansana says:

i’am using python 3.5 but new pyside2 python3.6 plz make support python 3.5

Alex Blasche Alex Blasche says:

Stable ABI is used which means 3.4, 3.5 and 3.6 will work with same binaries.

Good says:

Python and Qt are a perfect fit.

Adam V says:

I’m very curious towards how this will be embodied and
what the advantages will be over the current PySide and PyQt.

Always great to hear Python and Qt progress

Alex Blasche Alex Blasche says:

I would argue there is no current Qt for Python/Pyside2 (for Qt 5). There is only Pyside1 for Qt 4. Apart from that it means that we commit to develop, maintain, support and release future versions. Previously there was only limited development and no commitment for it.

thijs says:

No Python for Qt 5? Ehh, why have I been using it for over 3 years now with PyQt?

Harald Kjølberg Harald Kjølberg says:

PyQt have had Qt5 support for some time, that is true. PySide however, have only had support for Qt4, and the effort spent on PySide2 have been limited up till now. As Qt for Python (PySide2) is The Qt Company’s official solution, this is what we have been focusing on here.

PLJ says:

Looking forward to using it from within QtCreator for a full Qt python exprience. I hope this wil follow soon. In the end I hope to use integrated coding, debugging, unittesting and packaging.

Cristián Cristián says:

I agree, and there has been a lot of effort to make this happen, so hopefully we will have some news regarding this topic.

Thomas says:

There are two huge missing pieces for a great Qt+Python experience : great support for python in Creator (it is currently very minimalist) and, obviously, support for Qt5 in PySide (or PySide2, or whatever you call it).

DerHandwerk says:

Qt for Python sounds great!

Do you also plan to support mobile platforms (ios and android)?

Cristián Cristián says:

Not at the moment, but we will love to hear back from the users to define our next milestones.

Philip says:

mobile platforms (ios and android) support would make PySide2 more competitive that PyQt

Fabrice S says:

A Qt Python binding is mostly related to an automatic way to wrap C++ classes to Python ( or whatever C based language ). This topic was never properly addressed due to the lack of introspection and dynamic support in C++. Some solutions exists, SWIG for quick and dirty, sip for PyQt, and few other ones.

Would be interesting to document how it is achieved, i.e. : How is build a kind of CFFI for a particular C++ framework.
Usage of Qt MOC ?
How to wrap its own C++ classes ?

Another interesting topic is how to handle the stack of languages : C++, simple Javascript for QML and Python; and even an additional layer of Java / Objective-C on mobile platform.

alex says:

They are using shiboken2 for the binding generation

Cristián Cristián says:

Good question!, we are preparing a blog about the generation process, stay tuned!

Kelly Snapka says:

I’m not seeing QtWebEngine in the Windows build. Is there any ETA on when to expect it?

stlcours says:

1. Can we use the embedded python? So the client don’t need install python that maybe is a hard work. Of course you should still give us a choice to use the system python.
2. Can the code, written by python for Qt, be compiled to one exe?
3. Can python code be put in resources file, as same as qml, with libpython27.a ? This question is not relative to python for Qt, but I hope you can think about it. So we can directly use illimited python classes but cache it for our clients.

Best regards

apple customer service number says:

Python and Qt are a perfectly wise!

Thanks & Regards

stlcours says:

Does it possible use signals and slots between C++ and Python? So when the python work progress, c++ could well know.

Harald Kjølberg Harald Kjølberg says:

Yes. Qt’s signalling mechanism can be used between Python and Qt, allowing interaction between Python and GUI. Stay tuned for more technical details in following blogposts and/or check out https://wiki.qt.io/Qt_for_Python for IRC channel, official mailing list etc.

Ahmed Mannoun says:

Perfect .. I hope that one day we could build develop compile and debug multilanguage code from QT Creator … it will be awesome to have it ready for python development side to C++ and QML.

Laur says:

Any chance to have x86 Windows?

Mitchell Ferguson says:

This is fantastic news! Does this mean that there will be a complete set of python Qt documentation? Lack of Python documentation and code samples is the biggest weakness with the current pyqt situation.

Jason says:

“The fact that Python is one of the fastest growing programming languages, measured in popularity, is probably also old news in most communities. ”

It is a mistake to interpret the increased popularity of python as that people are developing apps with it. They are not. The bump in python is solely due to machine learning.

However, I first used Qt with Python back in 2005. It was a hoot! But it doesn’t make much sense with QML which is even easier. We’d better off putting the resources that would be devoted to python to improving Qt proper, not another language binding.

Commenting closed.

Get started today with Qt Download now