Qt for Python/zh

From Qt Wiki
< Qt for Python
Revision as of 10:03, 14 February 2019 by Blacklin (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

pysidelogo.png

Qt for Python

Qt for Python 项目旨在为PySide模块提供完整的Qt5接口支持。于2015年5月在GitHub 上开始开发。此项目计划使PySide支持 Qt 5.3, 5. 4 和 5.5。 2016年4月中Qt公司决定正式支持为其提供接口支持 (查看 详情 ).

该模块计划于2018 年6月中旬作为技术预览版发布(支持Qt 5.11)。并在同年12月支持Qt 5.12并正式发布

这个wiki页面跟踪 Qt for Python 项目开发的进展情况,并提供关于这项工作的更多信息。

Qt for Python在LGPLv3 / GPLv2和以下平台的商业许可下可用:

Linux macOS Windows
32bit 64bit 32bit 64bit 32bit 64bit
Python 2.7 * * ** **
Python 3.5+ * *

*: 不包含Qt 发行版.
**: Python 2.7 与 Qt在MSVC下的问题

要获取pyside2只需要在pip里执行: pip install PySide2

Qt for Python 看起来是什么样的?

import sys
from PySide2.QtWidgets import QApplication, QLabel
                                                     
if __name__ == "__main__":
    app = QApplication([])
    label = QLabel("Hello World")
    label.show()
    sys.exit(app.exec_())

更多例子可以从 项目仓库 中的 examples 文件夹中查看.

开始


社区

开发状态

  • 开发笔记: 开发进程总结
  • Qt for Python Development Progress Notes The most current view of the progress can be found in Jira: Unresolved issues and All issues (including resolved). The second link is useful to monitor the progress of the backlog. The best way to achieve this is to sort the list by the "Updated" column. Larger backlog/feature items are filed as "User Stories" in Jira.
  • Missing PySide2 bindings: the list of the current missing bindings.


常见问题

  • Q: PySide? Qt for Python? 这名字到底是什么?
    • A: 这个项目的名字是 Qt for Python ,这个模块的名字是 PySide2.
  • Q: 为什么是 PySide2 而不是接着用 PySide?
    • A: 因为 PySide 是基于 Qt4, 当支持 Qt5时, 把名字改为 PySide2 用来说明这是新版本.
  • Q: 旧的 PySide 项目相关信息要在哪里找?
    • A: 旧的 PySide wiki页面依然可用, 但是 这个项目已经被放弃并且没有官方支持. 我们非常不建议使用它.
  • Q: 我的项目用的是 PySide, 想要升级并适配PySide2会很难么?
    • A: 这两者的不同点与 Qt4 和 Qt5的不同类似, 对于PySide用户来说通常是要修改import 语句,因为很多类都从QtGui移动到QtWidgets。
Qt 5 高度兼容 Qt 4. 使得开发者从Qt 4应用无缝升级到 Qt 5 并且其当前功能不更改并使用Qt 5 的新功能成为可能。


为 the Qt for Python Wiki 作出贡献

这个Wiki是一个社区,您可以很容易地为它出一份力,其中可能包含快速变化的信息。 请将与Qt相关的wiki页面添加到“QtForPython”类别中,将以下文本添加到页面顶部:

[[Category:Qt for Python]]

在创建一个新的wiki页面时,请用前缀"Qt_for_Python/",这样所有的wiki页面名称都将具有相同的结构和面包屑,以便更容易地导航。