PySide

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
PySide
Pyside.png
Original author(s)The Qt Company
Developer(s)The Qt Company
Initial release18 August 2009; 9 years ago (2009-08-18)[1] (under the name of PySide)
Stable release
PySide 1.2.1 / 16 August 2013; 5 years ago (2013-08-16)[2]
Preview release
PySide2 (part of Qt for Python) 5.11.2 Technical preview / 21 September 2018; 58 days ago (2018-09-21)[3][4]
Written inPython
Operating systemLinux/X11, Mac OS X, Windows
LicenseLGPL
Websitewiki.qt.io/PySide2

PySide2 [5] is a Python binding of the cross-platform GUI toolkit Qt, currently developed by The Qt Company under the Qt for Python project. It is one of the alternatives to the standard library package Tkinter. Like Qt, PySide2 is free software. The project started out using Boost.Python from the Boost C++ Libraries for the bindings and later switched to the binding generator Shiboken[6] to reduce the size of the binaries and the memory footprint.

PySide was released under the LGPL in August 2009 by Nokia,[1] the former owners of the Qt toolkit, after Nokia failed to reach an agreement with PyQt developers Riverbank Computing[7] to change its licensing terms to include LGPL as an alternative license.

Work is currently underway to officially launch PySide2 as a Qt product, after all the effort on porting PySide[8] to work with Qt 5.

PySide2 supports Linux/X11, Mac OS X, Windows and Maemo. Support for Android is currently being added by the PySide community.[9]

Hello World example[edit]

# Import PySide2 classes                                                              
import sys                                                                           
from PySide2 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[edit]

References[edit]

  1. ^ a b PySide has been released, August 18th, 2009 – PySide – Python for Qt. Archived October 25, 2009, at the Wayback Machine.
  2. ^ https://wiki.qt.io/PySide_FAQ
  3. ^ blog.qt.io/blog/2018/07/17/qt-python-available-pypi/
  4. ^ https://pypi.org/project/PySide2/
  5. ^ "PySide2 - Qt Wiki".
  6. ^ "Shiboken". qt.io. Retrieved 2016-09-06.
  7. ^ "FAQ – PySide – Python for Qt". Pyside.org. Retrieved 2015-05-04.
  8. ^ "Bringing pyside back to Qt Project".
  9. ^ "Which platforms is PySide available for? FAQ – PySide – Python for Qt". Pyside.org. Retrieved 2015-05-04.

External links[edit]