PySide
   HOME

TheInfoList



OR:

PySide is a
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
binding of the
cross-platform In 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 platforms. Some cross-platform software r ...
GUI The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
toolkit Qt developed by
The Qt Company The Qt Company (pronounced "cute"; formerly Trolltech and Quasar Technologies) is a software company based in Espoo, Finland. It oversees the development of its Qt application framework within the Qt Project. It was formed following the acqui ...
, 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 organization based in Montreal, Quebec, Canada. Alternatives works to promote justice and equality a ...
to the standard library package
Tkinter Tkinter is a Python binding to the Tk GUI toolkit. 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 Python. T ...
. Like Qt, PySide is
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
. PySide supports
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
/
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
,
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
, and
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
.


History

By 2009,
Nokia Nokia Corporation (natively Nokia Oyj, referred to as Nokia) is a Finnish multinational corporation, multinational telecommunications industry, telecommunications, technology company, information technology, and consumer electronics corporatio ...
, 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
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 m ...
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 (natively Nokia Oyj, referred to as Nokia) is a Finnish multinational corporation, multinational telecommunications industry, telecommunications, technology company, information technology, and consumer electronics corporatio ...
, 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 m ...
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 software platform originally developed by Nokia, now developed by the community, for smartphones and Internet tablets. The platform comprises both the Maemo operating system and SDK. Maemo played a key role in Nokia's strategy to com ...
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). Primarily targeted at mobile devices and information appliances ...
, 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 is a set of libraries for the C++ programming language that provides support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. It conta ...
for the bindings. It later created its own binding generator named Shiboken, to reduce the size of the binaries and the memory footprint.


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

*
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 m ...
*
PyGTK PyGTK is a set of Python wrappers for the GTK graphical user interface library. PyGTK is free software and licensed under the LGPL. It is analogous to PyQt/ PySide and wxPython, the Python wrappers for Qt and wxWidgets, respectively. Its ...
*
wxPython wxPython is a wrapper for the cross-platform GUI API (often referred to as a "toolkit") wxWidgets (which is written in C++) for the Python programming language. It is one of the alternatives to Tkinter. It is implemented as a Python extensio ...


References


External links


Official website

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