Qt for Python/zh: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Qt for Python]]
[[Category:Qt for Python]]
{{LangSwitch}}
{{LangSwitch}}
== Qt for Python ==
==Qt for Python==
[[File:Py-128.png|thumb|left|Qt for Python official logo.]]'''Qt for Python''' 项目旨在为PySide模块提供完整的Qt接口支持。于2015年5月在[https://github.com/PySide GitHub] 上开始开发。此项目计划使PySide支持 Qt 5.3, 5.
[[File:Py-128.png|thumb|left|Qt for Python official logo.]]'''Qt for Python''' 项目旨在为PySide模块提供完整的Qt接口支持。于2015年5月在[https://github.com/PySide GitHub] 上开始开发。此项目计划使PySide支持 Qt 5.3, 5.
4 和 5.5。 2016年4月中Qt公司决定正式支持为其提供接口支持 (查看 [https://groups.google.com/forum/#!topic/pyside-dev/pqwzngAGLWE details 详情] ).
4 和 5.5。 2016年4月中Qt公司决定正式支持为其提供接口支持 (查看 [https://groups.google.com/forum/#!topic/pyside-dev/pqwzngAGLWE details 详情] ).
Line 8: Line 8:


2020年12月,该模块跟随Qt6发布,与旧版本相比有以下不同:
2020年12月,该模块跟随Qt6发布,与旧版本相比有以下不同:
* 不在支持 Python 2.7,
 
* 放弃对 Python 3.5 的支持, 最低支持到 3.6+ (最高 3.9)
*不在支持 Python 2.7,
* 基础模块有大量删减 ([https://www.qt.io/blog/add-on-support-in-qt-6.0-and-beyond 点此查看删减内容])
*放弃对 Python 3.5 的支持, 最低支持到 3.6+ (最高 3.9)
*基础模块有大量删减 ([https://www.qt.io/blog/add-on-support-in-qt-6.0-and-beyond 点此查看删减内容])
 
你可以在 [https://www.qt.io/blog/qt-for-python-6-released 官方博客]中看到更多内容.
你可以在 [https://www.qt.io/blog/qt-for-python-6-released 官方博客]中看到更多内容.


Line 35: Line 37:
|-
|-
| style="background: #aec6cf;text-align: center;" |'''Python 3.6+'''
| style="background: #aec6cf;text-align: center;" |'''Python 3.6+'''
| style="background: #ff6961;text-align: center;" | *
| style="background: #ff6961;text-align: center;" |*
| style="background: #77dd77;text-align: center;" |  
| style="background: #77dd77;text-align: center;" |
| style="background: #ff6961;text-align: center;" | *
| style="background: #ff6961;text-align: center;" |*
| style="background: #77dd77;text-align: center;" |  
| style="background: #77dd77;text-align: center;" |
| style="background: #ff6961;text-align: center;" | **
| style="background: #ff6961;text-align: center;" |**
| style="background: #77dd77;text-align: center;" | ***
| style="background: #77dd77;text-align: center;" |***
| style="background: #77dd77;text-align: center;" | ***
| style="background: #77dd77;text-align: center;" |***
|}
|}
||
||
* <nowiki>*</nowiki> https://wiki.qt.io/Qt_6.0_Tools_and_Versions
*<nowiki>*</nowiki> https://wiki.qt.io/Qt_6.0_Tools_and_Versions
* <nowiki>**</nowiki> 不再支持
*<nowiki>**</nowiki> 不支持
* <nowiki>***</nowiki>: 5.14 是第一个支持 Python 3.8的版本, 但 Python 3.8.0 无法在windows上运行. 请使用 '''Python 3.8.1''' 或更高版本.
*<nowiki>***</nowiki>: 5.14 是第一个支持 Python 3.8的版本, 但 Python 3.8.0 无法在windows上运行. 请使用 '''Python 3.8.1''' 或更高版本.
|}
|}


Line 54: Line 56:
[[File:Pyside6 install.gif]]
[[File:Pyside6 install.gif]]


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


{| class="wikitable"
{| class="wikitable"
|-
|-
! Code !! Application
!Code!!Application
|-
|-
|
|
Line 73: Line 75:
</syntaxhighlight>
</syntaxhighlight>
   
   
  ||  
  ||
[[File:2020-12-16-101334 305x245 scrot.png]]
[[File:2020-12-16-101334 305x245 scrot.png]]
|}
|}
Line 82: Line 84:
更多例子可以从 [http://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples 项目仓库] 中的 '''examples''' 文件夹中查看.
更多例子可以从 [http://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples 项目仓库] 中的 '''examples''' 文件夹中查看.


== 开始 ==
==开始==
* [https://doc.qt.io/qtforpython/ 官方文档]
 
* [[Qt_for_Python/GettingStarted|分别在 macOS, Windows 和 Linux中快速入门]]: 下载并安装/编译
*[https://doc.qt.io/qtforpython/ 官方文档]
* [[Qt_for_Python/Tutorial|教程]]: 开始开发pyside2程序
*[[Qt_for_Python/GettingStarted|分别在 macOS, Windows 和 Linux中快速入门]]: 下载并安装/编译
* [[Qt_for_Python/Shiboken|Shiboken]]: 有关Python绑定生成器的一般信息。
*[[Qt_for_Python/Tutorial|教程]]: 开始开发pyside2程序
* [[Qt_for_Python/Development_Getting_Started|开发: 开始参与开发]]: 参与开发的一些准则。
*[[Qt_for_Python/Shiboken|Shiboken]]: 有关Python绑定生成器的一般信息。
* [[Qt_for_Python/Reporting_Bugs|反馈错误]] 报告 PySide2 或 Shiboken2.有关的任何问题.
*[[Qt_for_Python/Development_Getting_Started|开发: 开始参与开发]]: 参与开发的一些准则。
* [https://codereview.qt-project.org/pyside/pyside-setup Git repository (代码审查)] (5.12 分支是当前为PySide2工作的分支) 与 [https://codereview.qt-project.org/#/q/project:%255Epyside.%252B,n,z PySide2 开放补丁]  
*[[Qt_for_Python/Reporting_Bugs|反馈错误]] 报告 PySide2 或 Shiboken2.有关的任何问题.
*[https://codereview.qt-project.org/pyside/pyside-setup Git repository (代码审查)] (5.12 分支是当前为PySide2工作的分支) 与 [https://codereview.qt-project.org/#/q/project:%255Epyside.%252B,n,z PySide2 开放补丁]




== 社区 ==
==社区==


* 在FreeNode上的官方 IRC 频道 [https://freenode.net/ Freenode] '''#qt-pyside'''
*在FreeNode上的官方 IRC 频道 [https://freenode.net/ Freenode] '''#qt-pyside'''
* [http://lists.qt-project.org/mailman/listinfo/pyside 官方邮件列表]
*[http://lists.qt-project.org/mailman/listinfo/pyside 官方邮件列表]
* Keybase:
*Keybase:
** [https://keybase.io/team/pyside keybase.io/team/pyside]
**[https://keybase.io/team/pyside keybase.io/team/pyside]
** [https://keybase.io/team/pyside keybase.io/team/theqtcompany] (工作小组 ''theqtcompany.pyside'')
**[https://keybase.io/team/pyside keybase.io/team/theqtcompany] (工作小组 ''theqtcompany.pyside'')
* Gitter: [http://gitter.im/PySide/pyside2 gitter.im/PySide/pyside2] 包含关联IRC的bot
*Gitter: [http://gitter.im/PySide/pyside2 gitter.im/PySide/pyside2] 包含关联IRC的bot
* [[Qt_for_Python/Suggestions|有想法? 与我们分享吧!]]
*[[Qt_for_Python/Suggestions|有想法? 与我们分享吧!]]


== 开发状态 ==
==开发状态==


* [[Qt_for_Python_Development_Notes|开发笔记]]: 开发进程总结
*[[Qt_for_Python_Development_Notes|开发笔记]]: 开发进程总结
* '''Qt for Python Development Progress Notes''' The most current view of the progress can be found in Jira: [https://bugreports.qt.io/secure/IssueNavigator.jspa?mode=hide&requestId=17825 Unresolved issues] and [https://bugreports.qt.io/secure/IssueNavigator.jspa?mode=hide&requestId=18025 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.
*'''Qt for Python Development Progress Notes''' The most current view of the progress can be found in Jira: [https://bugreports.qt.io/secure/IssueNavigator.jspa?mode=hide&requestId=17825 Unresolved issues] and [https://bugreports.qt.io/secure/IssueNavigator.jspa?mode=hide&requestId=18025 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.
* [[Qt_for_Python_Missing_Bindings|Missing PySide2 bindings]]: the list of the current missing bindings.
*[[Qt_for_Python_Missing_Bindings|Missing PySide2 bindings]]: the list of the current missing bindings.




== 为 the Qt for Python Wiki 作出贡献 ==
==为 the Qt for Python Wiki 作出贡献==


这个Wiki是一个社区,您可以很容易地为它出一份力,其中可能包含快速变化的信息。
这个Wiki是一个社区,您可以很容易地为它出一份力,其中可能包含快速变化的信息。

Revision as of 03:57, 30 December 2020

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

Qt for Python

Qt for Python official logo.

Qt for Python 项目旨在为PySide模块提供完整的Qt接口支持。于2015年5月在GitHub 上开始开发。此项目计划使PySide支持 Qt 5.3, 5.

4 和 5.5。 2016年4月中Qt公司决定正式支持为其提供接口支持 (查看 details 详情 ).

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

2020年12月,该模块跟随Qt6发布,与旧版本相比有以下不同:

  • 不在支持 Python 2.7,
  • 放弃对 Python 3.5 的支持, 最低支持到 3.6+ (最高 3.9)
  • 基础模块有大量删减 (点此查看删减内容)

你可以在 官方博客中看到更多内容.

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

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

Linux macOS Windows
32bit 64bit 32bit 64bit Apple M1 32bit 64bit
Python 3.6+ * * ** *** ***


通过 pip 安装 PySide6 只需运行: pip install pyside6

Pyside6 install.gif

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

Code Application
import sys
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QApplication, QLabel
                                                     
if __name__ == "__main__":
    app = QApplication(sys.argv)
    label = QLabel("Hello World", alignment=Qt.AlignCenter)
    label.show()
    sys.exit(app.exec_())

2020-12-16-101334 305x245 scrot.png



更多例子可以从 项目仓库 中的 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.


为 the Qt for Python Wiki 作出贡献

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

[[Category:Qt for Python]]

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