HOME

TheInfoList



OR:

PySide is a Python binding of the
cross-platform Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several Computing platform, computing platforms. Some ...
GUI toolkit Qt developed by
The Qt Company Qt Group Plc (Qt is pronounced "cute") is a software company headquartered in Espoo, Finland. It was formed following the acquisition of Qt by Digia, but was later spun off into a separate, publicly traded company. The company oversees the dev ...
, as part of the Qt for Python project. It is one of the
alternatives Founded in 1994, Alternatives, Action and Communication Network for International Development, is a non-governmental, international solidarity movement, international solidarity organization based in Montreal, Quebec, Canada. Alternatives works ...
to the standard library package
Tkinter Tkinter is a binding to the Tk GUI toolkit for Python. It is the standard Python interface to the Tk GUI toolkit, and is Python's ''de facto'' standard GUI. Tkinter is included with standard Linux, Microsoft Windows and macOS installs of Pyth ...
. Like Qt, PySide is
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
. PySide supports
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
/
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
,
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
, and
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
. The project can also be cross compiled to embedded systems like Raspberry Pi, and Android devices.


History

By 2009,
Nokia Nokia Corporation is a Finnish multinational corporation, multinational telecommunications industry, telecommunications, technology company, information technology, and consumer electronics corporation, originally established as a pulp mill in 1 ...
, the then owners of the Qt toolkit, wanted Python binding available under the
LGPL The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
license. Nokia failed to reach an agreement with Riverbank Computing, the developers of the
PyQt PyQt is a Python binding of the cross-platform GUI toolkit Qt, implemented as a Python plug-in. PyQt is free software developed by the British firm Riverbank Computing. It is available under similar terms to Qt versions older than 4.5; this ...
Python binding. In August, Nokia released PySide. It provided similar functionality, but under the LGPL. 'Side' is Finnish for binding. There have been three major versions of PySide: * PySide supports Qt 4 * PySide2 supports Qt 5 * PySide6 supports Qt 6 PySide version 1 was released in August 2009 under the
LGPL The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
by
Nokia Nokia Corporation is a Finnish multinational corporation, multinational telecommunications industry, telecommunications, technology company, information technology, and consumer electronics corporation, originally established as a pulp mill in 1 ...
, then the owner of the Qt toolkit, after it failed to reach an agreement with
PyQt PyQt is a Python binding of the cross-platform GUI toolkit Qt, implemented as a Python plug-in. PyQt is free software developed by the British firm Riverbank Computing. It is available under similar terms to Qt versions older than 4.5; this ...
developers Riverbank Computing to change its licensing terms to include
LGPL The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
as an alternative license. It supported Qt 4 under the operating systems Linux/X11, Mac OS X, Microsoft Windows,
Maemo Maemo is a Linux-based software platform originally developed by Nokia, now developed by the Free software movement, community, for smartphones and Internet tablets. The platform comprises both the Maemo operating system and Software development ...
and
MeeGo MeeGo is a discontinued Linux distribution hosted by the Linux Foundation, using source code from the operating systems Moblin (produced by Intel) and Maemo (produced by Nokia). MeeGo was primarily targeted at mobile devices and information app ...
, while the PySide community added support for Android. PySide2 was started by Christian Tismer to port PySide from Qt 4 to Qt 5 in 2015. The project was then folded into the Qt Project. It was released in December 2018. PySide6 was released in December 2020. It added support for Qt 6 and removed support for all Python versions older than 3.6. The project started out using Boost. Python from the
Boost C++ libraries Boost, boosted or boosting may refer to: Science, technology and mathematics * Boost, positive manifold pressure in turbocharged engines * Boost (C++ libraries), a set of free peer-reviewed portable C++ libraries * Boost (material), a material b ...
for the bindings. It later created its own binding generator named Shiboken, to reduce the size of the binaries and the
memory footprint Memory footprint refers to the amount of main memory that a program uses or references while running. The word footprint generally refers to the extent of physical dimensions that an object occupies, giving a sense of its size. In computing, t ...
.


"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

*
PyQt PyQt is a Python binding of the cross-platform GUI toolkit Qt, implemented as a Python plug-in. PyQt is free software developed by the British firm Riverbank Computing. It is available under similar terms to Qt versions older than 4.5; this ...
*
PyGTK PyGTK is a set of Python (programming language), Python Adapter pattern, wrappers for the GTK graphical user interface library (computer science), library. PyGTK is free software and licensed under the LGPL. It is analogous to PyQt/PySide and w ...
* wxPython


References


External links


Official website

Official Documentation
on the Qt Documentation web site
Qt for Python
on the Qt wiki
Differences Between PySide and PyQt
on the Qt wiki Python (programming language) libraries Qt (software) Widget toolkits {{Free-software-stub