PySide2 5.15.2 for Qt 5.15.2 Official Installer (Python-based GUI binding)


Other reference resources

 

PySide 是一个将强大 C++ 编程语言 Qt 库绑定到 Python 编程语言的 GUI 应用程序工具包。

与 Qt 一样 PySide 也是自由软件,其采用 LGPL (GNU Lesser General Public License) 许可授权协议。


PySide 由 Qt 官方开发维护,项目名 Qt for Python。

2018 年 6 月发布 PySide2,2009 年 8 月 PySide1 首次发布。

从 PySide2 起,Shiboken2 模块从主安装包中分离,需单独或依赖安装。

最新版 PySide6 基于 Qt 6.1.1,稳定版 PySide2 基于 Qt 5.15.2,过时版 PySide1.2.4 基于 Qt/C++ 4.8.7。

PySide6 支持 Python 3.6 3.7 3.8 3.9,不再支持 Python 2.7;PySide2 支持 Python 2.7 3.5 3.6 3.7 3.8 3.9 (某些模块不支持 x86);PySide1 仅支持 Python 2.7 3.4。

PySide2 和 PyQt5 API 相差很大,但 PySide1 和 PyQt4 API 却几乎完全兼容 (除名称不同外)。

PySide 带有拖拽式 GUI 设计工具 QtDesigner (但理念不成熟只适于新手)。

PySide 是 Python 编程语言的 GUI (图形用户界面) 解决方案之一,除可代替 Python 内置 Tkinter 外,主要用于取代 PyQt。

Python GUI 的其它替代者,包括 PyQt PyGTK wxPython 等。

Shiboken


Shiboken 是一个 Generator Runner 前端插件,它使用 CPython 源代码为 C++ 库生成绑定。 Generator Runner 是为便于 C++ 和 Qt 库开发语言绑定而创建的一个工具。 它提供了一个框架,使得这个过程能最大可能自动化:使用 ApiExtractor 提取 C++ 头文件中的信息,通过相应前端 (用户可以自己提供) 生成某种目标语言绑定。 Shiboken 为 CPython 生成绑定,DocGenerator 为要绑定的库生成文档。

Shiboken

Generator Runner 定义了一个前端接口类 Generator; 每个前端插件 (如 Shiboken) 只需要提供了一个函数 void getGenerators(GeneratorList* list) 来返回包含 Generator 的一个链表 (QLinkedList); 在调用 Generator Runner 时,通过 generatorrunner --generator-set=shiboken 命令行指定使用哪一个前端。

当编译或安装 Shiboken 时,我们会注意到和 Shiboken 名字相关的有 3 个文件: shiboken_generator(.dll/.so/...) 是插件 (前端); shiboken-python*(.dll/.so/...) 是最终生成代码运行需依赖的; shiboken(.exe) 是壳文件,就是 generatorrunner --generator-set=shiboken。

在命令行 --generator-set,我们可指定 Shiboken 插件完整路径。 如果不是完整路径,generatorrunner 会先合成文件名 shiboken_generator.dll,再搜索编译时指定插件目录、QCoreApplication::libraryPaths() 返回路径。

要想为 C++ 库生成绑定,需 API Extractor 从 C++ 库头文件中提取信息,通过 typesystem 文件控制提取 (修改、重命名) 哪些信息。 信息提取后,理论上就可为各种高层语言提供绑定 (只要有相应的前端存在)。

Compatibility List

Python Linux 32bits Linux 64bits macOS 32bits macOS 64bits Windows 32bits Windows 64bits
v3.8.1+ PySide2 PySide2 PySide2 PySide2
v3.8.0 PySide2 PySide2 Not support PySide2 for Qt 5.14 Not support PySide2 for Qt 5.14
v3.5 3.6 3.7 PySide2 PySide2 PySide2 PySide2
v3.4 PySide1.2.4 PySide1.2.4 PySide1.2.4 PySide1.2.4 PySide1.2.4 PySide1.2.4
v2.7 PySide1.2.4 PySide1.2.4 PySide2 PySide1.2.4 PySide1.2.4 PySide2 PySide1.2.4 PySide1.2.4

Version History

Time Version Qt Explanation Remark
2020.11 5.15.2 5.15.2
2020.09 5.15.1 5.15.1 Begin support Python 3.9
2020.07 5.14.2.3 5.14.2
2020.05 5.15.0 5.15.0 Begin to support Qt 5Pdf QtQuickControls2 QtSerialPort MSVC2019
5.14.2.2 5.14.2
2020.04 5.14.2.1 5.14.2
2020.03 5.14.2 5.14.2
2020.01 5.14.1 5.14.1
2019.12 5.14.0 5.14.0 Begin to support CPython3.8
2019.11 5.13.2 5.13.2
2019.09 5.13.1 5.13.1
2019.06 5.13 5.13

Begin to support PDF OpenSSL1.1

QtWebEngine pop-up local document links are not supported (by default)

No longer supported MSVC2015
2019.03 5.12 5.12
2018.06 5.11 5.11

Python2.7 (built with MSVC2008)

Python3.5 3.6 3.7 (built with MSVC2015)

Officially maintained by Qt, project name changed to Qt for Python

Web core changed from Apple Safari to Google Chromium

2015.10 1.2.4 4.8.7

Python2.6 2.7 (built with MSVC2008)

Python3.3 3.4 (built with MSVC2010)

最后一个 Qt 4 绑定版本, 存在一些 Bugs,譬如:

粘贴修改交互 Web 内容自动变行 、插入位置不对 、自动设置字体颜色 color=#000

在 QWebView 点击某些 JavaScript 链接无响应 、某些链接不弹出窗口 、某些 PNG 图片不展示

2013.08 1.2.1 4.8
2009.08 1.0 4.5 First released Maintained by the open source community, use LGPL license agreement

 

PySide1.2.4 for Qt 4.8.7 Official Installer (Python-based GUI binding)


Net Disk Download

System: Microsoft Windows / Mac OS X / Unix / Linux (x86 & amd64)

 

Copyright Notice: This article is an exclusive original manuscript, copyright belongs to Happy Digits Software , shall not be reproduced without permission.