By 2009, Nokia, the then owners of the Qt toolkit, wanted Python binding available under the LGPL license. Nokia failed to reach an agreement with Riverbank Computing the developers of PyQt Python binding.[6] In August, Nokia released PySide. It provided similar functionality, but under the LGPL.[7][8] 'Side' is Finnish for binding.[6]
There have been three major versions of PySide:[9]
PySide supports Qt 4
PySide2 supports Qt 5
PySide6 supports Qt 6
PySide version 1 was released in August 2009 under the LGPL by Nokia,[1] then the owner of the Qt toolkit, after it failed to reach an agreement with PyQt developers Riverbank Computing[10] to change its licensing terms to include LGPL as an alternative license. It supported Qt 4 under the operating systems Linux/X11, Mac OS X, Microsoft Windows, Maemo and MeeGo,[11] while the PySide community added support for Android.[12]
PySide2 was started by Christian Tismer to port PySide from Qt 4 to Qt 5 in 2015.[13] The project was then folded into the Qt Project.[14] It was released in December 2018.[13]
PySide6 was released in December 2020. It added support for Qt 6 and removed support for all Python versions older than 3.6.[9]
The project started out using Boost.Python from the Boost C++ libraries for the bindings. It later created its own binding generator named Shiboken,[15] to reduce the size of the binaries and the memory footprint.[16][when?]
Hello, World! example
# Import PySide6 classesimportsysfromPySide6importQtCore,QtWidgets# Create a Qt applicationapp=QtWidgets.QApplication(sys.argv)# Create a Windowmywindow=QtWidgets.QWidget()mywindow.resize(320,240)mywindow.setWindowTitle('Hello, World!')# Create a label and display it all togethermylabel=QtWidgets.QLabel(mywindow)mylabel.setText('Hello, World!')mylabel.setGeometry(QtCore.QRect(200,200,200,200))mywindow.show()# Enter Qt application main loopsys.exit(app.exec())