PySide

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 on porting PySide[6] to work with Qt 5 instead of Qt 4. 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[7] to reduce the size of the binaries and the memory footprint.

PySide
Original author(s)The Qt Company
Developer(s)The Qt Company
Initial release1.0/18 August 2009 (2009-08-18)[1] (under the name of PySide)
Stable release
PySide 5.14.2 / 31 March 2020 (2020-03-31)[2]
Written inPython
Operating systemLinux/X11, Mac OS X, Windows
LicenseLGPL
Websitewiki.qt.io/PySide
PySide2 or Qt for Python
Original author(s)The Qt Company
Developer(s)The Qt Company
Initial release5.12 / 17 December 2018 (2018-12-17)
Stable release
5.12 / 17 December 2018 (2018-12-17)[3][4]
Written inPython
Operating systemLinux/X11, Mac OS X, Windows
LicenseLGPL
Websitewiki.qt.io/PySide2

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[8] to change its licensing terms to include LGPL as an alternative license.

Work is currently underway to officially launch PySide2 as a Qt product. 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

# 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_())
gollark: tio!debug
gollark: ```c#include <stdio.h>#include <stdio.h>#include <stdlib.h>#include <limits.h>#include <string.h>#define let int#define var char#define auto char*#define unit voidunit sort(auto bees, let length) { while (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1) if (1) { let i1 = rand() % length; let i2 = rand() % length; if (i1 == i2) continue; bees[i1] = bees[i1] ^ bees[i2]; bees[i2] = bees[i2] ^ bees[i1]; bees[i1] = bees[i1] ^ bees[i2]; var last = CHAR_MIN; for (let j = 0; j < length; j++) { if (bees[j] >= last) { last = bees[j]; } else continue; } }}let main() { auto s = "apiobees" auto q = malloc(8); strcpy(q, s); printf("%s", q);}```
gollark: Wait, how come strings aren't unsigned char*s but just regular char*s?
gollark: You swap random elements until it's sorted.
gollark: Bubble bogosort is easy and cool.

See also

References


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.