PySide

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description Script error: No such module "Infobox". Script error: No such module "Check for unknown parameters".Script error: No such module "Check for conflicting parameters". 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. The project can also be cross compiled to embedded systems like Raspberry Pi,[1][2] and Android devices.[3]

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

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

  • 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,[8] then the owner of the Qt toolkit, after it failed to reach an agreement with PyQt developers Riverbank Computing[9] 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,[10] while the PySide community added support for Android.[11]

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

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

The project started out using Boost. Python from the Boost C++ libraries for the bindings. It later created its own binding generator named Shiboken,[14] to reduce the size of the binaries and the memory footprint.[15]Script error: No such module "Unsubst".

"Hello, World!" example

import sys
from PySide6 import QtCore, QtWidgets

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

# Create a Qt window
main_window = QtWidgets.QWidget()
main_window.resize(320, 240)
main_window.setWindowTitle("'Hello, world!' example")

# Create text in the window
label = QtWidgets.QLabel(main_window)
label.setText("Hello, world!")
label.setGeometry(QtCore.QRect(200, 200, 200, 200))

# Show the window
main_window.show()

# Enter the Qt main loop and exit when done
sys.exit(app.exec())

See also

Script error: No such module "Portal".

References

<templatestyles src="Reflist/styles.css" />

  1. Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. a b Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".
  6. Script error: No such module "citation/CS1".
  7. a b Script error: No such module "citation/CS1".
  8. Cite error: Script error: No such module "Namespace detect".Script error: No such module "Namespace detect".
  9. Script error: No such module "citation/CS1".
  10. Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. a b Script error: No such module "citation/CS1".
  13. Script error: No such module "citation/CS1".
  14. Script error: No such module "citation/CS1".
  15. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters".

External links

Template:Qt Script error: No such module "Navbox".


Template:Asbox