请输入您要查询的百科知识:

 

词条 PySide
释义

  1. Hello World example

  2. See also

  3. References

  4. External links

{{Infobox software
| name = PySide2
| logo = Pyside.png
| author = The Qt Company
| developer = The Qt Company
| released = 1.0/{{Start date and age|2009|08|18|df=yes/no}}[1] (under the name of PySide)
| latest release version = PySide 1.2.4
| latest release date = {{Start date and age|2015|10|14|df=yes/no}}[2]
| status = Discontinued
| programming language = Python
| operating system = Linux/X11, Mac OS X, Windows
| platform =
| size =
| language =
| language count =
| language footnote =
| genre =
| license = LGPL
| website = {{URL|http://wiki.qt.io/PySide}}
}}{{Infobox software
| name = PySide2 or Qt for Python
| logo = Pyside.png
| author = The Qt Company
| developer = The Qt Company
| released = 5.12 / {{Start date and age|2018|12|17|df=yes/no}}
| latest release version = 5.12
| latest release date = {{Start date and age|2018|12|17|df=yes/no}}[3][4]
| status = under development
| programming language = Python
| operating system = Linux/X11, Mac OS X, Windows
| platform =
| size =
| language =
| language count =
| language footnote =
| genre =
| license = LGPL
| website = {{URL|http://wiki.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

  1. Import PySide2 classes

import sys

from PySide2 import QtCore, QtWidgets

  1. Create a Qt application

app = QtWidgets.QApplication(sys.argv)

  1. Create a Window

mywindow = QtWidgets.QWidget()

mywindow.resize(320, 240)

mywindow.setWindowTitle('Hello World!')

  1. 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()

  1. Enter Qt application main loop

sys.exit(app.exec_())

See also

{{Portal|Free and open-source software|Python programming}}
  • PyGTK
  • wxPython

References

1. ^PySide has been released, August 18th, 2009 – PySide – Python for Qt. {{webarchive |url=https://web.archive.org/web/20091025170910/http://www.pyside.org/2009/08/pyside-has-been-released/ |date=October 25, 2009 }}
2. ^ https://wiki.qt.io/PySide_FAQ
3. ^http://blog.qt.io/blog/2018/07/17/qt-python-available-pypi/
4. ^https://pypi.org/project/PySide2/
5. ^{{Cite web|url=https://wiki.qt.io/PySide2|title=PySide2 - Qt Wiki|last=|first=|date=|website=|publisher=|access-date=}}
6. ^{{cite web|url=https://wiki.qt.io/PySide_Shiboken |title=Shiboken|publisher=qt.io |date= |accessdate=2016-09-06}}
7. ^{{cite web|url=https://wiki.qt.io/PySide_FAQ |title=FAQ – PySide – Python for Qt |publisher=Pyside.org |date= |accessdate=2015-05-04}}
8. ^{{Cite web|url=https://groups.google.com/forum/#!topic/pyside-dev/pqwzngAGLWE|title=Bringing pyside back to Qt Project|last=|first=|date=|website=|publisher=|access-date=}}
9. ^{{cite web|url=https://wiki.qt.io/PySide_FAQ#Which_platforms_is_PySide_available_for.3F |title=Which platforms is PySide available for? FAQ – PySide – Python for Qt |publisher=Pyside.org |date= |accessdate=2015-05-04}}

External links

  • {{Official website|http://www.pyside.org/}}
  • [https://wiki.qt.io/Differences_Between_PySide_and_PyQt Differences Between PySide and PyQt], Qt documentation wiki
{{Qt}}{{Widget toolkits}}{{Free-software-stub}}

3 : Python libraries|Qt (software)|Widget toolkits

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/21 2:37:27