Jump to content

PySide

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Alter73 (talk | contribs) at 15:17, 8 November 2022. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

PySide
Original author(s)The Qt Company (as part of Nokia)
Developer(s)The Qt Company
Initial releaseAugust 18, 2009; 15 years ago (2009-08-18)[1]
Stable release
6.4.0.1 / October 27, 2022; 2 years ago (2022-10-27)[2]
Written inPython
Operating systemLinux/X11, macOS, Windows
LicenseLGPL
Websitewww.qt.io/qt-for-python

PySide is a Python binding of the cross-platform GUI toolkit Qt developed by The Qt Company, as part of the Qt for Python project. It is one of the alternatives to the standard library package Tkinter. Like Qt, PySide is free software. PySide supports Linux/X11, macOS, and Microsoft Windows.

History

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.[3] In August, Nokia released PySide it provided similar functionality, but under the LGPL.[4][5] 'Side' is Finnish for binding.[3]

There have been three major versions of PySide:[6]

  • 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[7] 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,[8] while the PySide community added support for Android.[9]

PySide2 was started by Christian Tismer to port PySide from Qt 4 to Qt 5 in 2015.[10] The project was then folded into the Qt Project.[11] It was released in December 2018.[10]

PySide6 was released in December 2020. It added support for Qt 6 and removed support for all Python versions older than 3.6.[6]

The project started out using Boost.Python from the Boost C++ libraries for the bindings. It later created its own binding generator named Shiboken,[12] to reduce the size of the binaries and the memory footprint.[13][when?]

Hello, World! example

# Import PySide6 classes
import sys
from PySide6 import QtCore, QtWidgets

# Create a Qt application
app = QtWidgets.QApplication(sys.argv)

# Create a Window
mywindow = QtWidgets.QWidget()
mywindow.resize(320, 240)
mywindow.setWindowTitle('Hello, World!')

# Create a label and display it all together
mylabel = QtWidgets.QLabel(mywindow)
mylabel.setText('Hello, World!')
mylabel.setGeometry(QtCore.QRect(200, 200, 200, 200))

mywindow.show()

# Enter Qt application main loop
sys.exit(app.exec())

See also

References

  1. ^ a b "PySide has been released". PySide – Python for Qt. August 18, 2009. Archived from the original on October 25, 2009.
  2. ^ "PySide6 Release History". Python Package Index.
  3. ^ a b faq, Martin Fitzpatrick Last updated (2019-06-21). "PyQt5 vs PySide2: What's the difference between the two Python Qt libraries?". Python GUIs. Retrieved 2022-06-25.
  4. ^ "FAQ – PySide – Python for Qt". Pyside.org. Retrieved 2009-09-03.
  5. ^ "PySide has been released – PySide – Python for Qt". Pyside.org. 2009-08-18. Archived from the original on 2009-10-25. Retrieved 2009-09-03.
  6. ^ a b Maureira-Fredes, Cristián (December 10, 2020). "Qt for Python 6 released". Qt. The Qt Company.
  7. ^ "PySide FAQ". Qt Wiki. July 31, 2017. Retrieved February 24, 2021.
  8. ^ "PySide Downloads". Qt Wiki. February 16, 2018. Retrieved February 24, 2021.
  9. ^ "PySide for Android guide". Qt Wiki. February 26, 2018. Retrieved February 24, 2021.
  10. ^ a b "Qt for Python". Qt Wiki. December 16, 2020. Retrieved February 24, 2021.
  11. ^ Knoll, Lars; Tismer, Christian (April 11, 2016). "Bringing pyside back to Qt Project". pyside-dev Google Group. Retrieved February 24, 2021.
  12. ^ "Shiboken". Qt Documentation. The Qt Company. Retrieved February 24, 2021.
  13. ^ "PySide Shiboken FAQ". Qt Wiki. June 5, 2016. Retrieved February 24, 2021.