Qt for Python: Difference between revisions
m (known issues fix) |
|||
Line 42: | Line 42: | ||
|} | |} | ||
<nowiki>*</nowiki>: [[Qt_5.12_Tools_and_Versions#Software_configurations_for_Qt_5.12.0| | <nowiki>*</nowiki>: [[Qt_5.12_Tools_and_Versions#Software_configurations_for_Qt_5.12.0|Overview of Qt releases]].<br /> | ||
<nowiki>**</nowiki>: [[Qt_for_Python/Considerations#Missing_Windows_.2F_Python_2.7_release|MSVC issue with Python 2.7 and Qt]].<br /> | <nowiki>**</nowiki>: [[Qt_for_Python/Considerations#Missing_Windows_.2F_Python_2.7_release|MSVC issue with Python 2.7 and Qt]].<br /> | ||
<nowiki>***</nowiki>: 5.14 will not work on Windows | <nowiki>***</nowiki>: 5.14 is the first version to support Python 3.8, but Python 3.8.0 will not work on Windows. Please use '''Python 3.8.1''' or greater. | ||
'''Get PySide2 via pip by running:''' <span style="font-family: monospace;background-color: #cecfd5;display: inline; border-radius: 4px;padding: 3px;">pip install PySide2</span> | '''Get PySide2 via pip by running:''' <span style="font-family: monospace;background-color: #cecfd5;display: inline; border-radius: 4px;padding: 3px;">pip install PySide2</span> |
Revision as of 05:48, 1 October 2020
Qt for Python
The Qt for Python project aims to provide a complete port of the PySide module to Qt 5. The development started on GitHub in May 2015. The project managed to port PySide to Qt 5.3, 5.4 & 5.5. During April 2016 The Qt Company decided to properly support the port (see details ).
The module was released mid June 2018 as a Technical Preview (supporting Qt 5.11), and it was officially released without the Technical Preview tag, in December 2018 for Qt 5.12.
This wiki page tracks the progress of the Qt for Python project development and provides further information concerning the effort.
Qt for Python is available under LGPLv3/GPLv2 and commercial license for the following platforms:
Linux | macOS | Windows | ||||
---|---|---|---|---|---|---|
32bit | 64bit | 32bit | 64bit | 32bit | 64bit | |
Python 2.7 | * | * | ** | ** | ||
Python 3.5+ | * | * | *** | *** |
*: Overview of Qt releases.
**: MSVC issue with Python 2.7 and Qt.
***: 5.14 is the first version to support Python 3.8, but Python 3.8.0 will not work on Windows. Please use Python 3.8.1 or greater.
Get PySide2 via pip by running: pip install PySide2
What does it look like?
import sys
from PySide2.QtWidgets import QApplication, QLabel
if __name__ == "__main__":
app = QApplication(sys.argv)
label = QLabel("Hello World")
label.show()
sys.exit(app.exec_())
More examples can be found in the project's repository inside the examples directory.
Getting Started
- Refer to the official documentation over the wiki for guides on getting started, tutorials, and more!.
- Getting started | wiki: download, build and install instructions.
- Porting docs | wiki: Porting an existing Qt/C++ application to Qt/Python the porting process.
- Tutorials | wiki: get started developing PySide2 applications.
- Shiboken | wiki: general information about the Python binding generator.
- Development: Getting started: guidelines to start contributing to the project.
- Considerations and known issues
- Reporting Bugs: report any issue related PySide2 or Shiboken2.
- Git repository (Code review) (5.15 branch is the branch currently worked on for PySide2) and PySide2 open patches
Community
- Official IRC channel on Freenode #qt-pyside - You can join via Webchat
- Official Mailing list
- Qt Forum: Qt for Python Subcategory
- Keybase:
- keybase.io/team/pyside
- keybase.io/team/theqtcompany (subteam theqtcompany.pyside)
- Gitter: gitter.im/PySide/pyside2 (including bot that bridges IRC)
- Matrix/Riot: #qt-pyside:matrix.org (Qt for Python)
- Telegram Group: Qt for Python
- Have an idea? share it with us!
Development Status
- Development Notes by date: the summary of the development progress.
- 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.
Frequently Asked Questions
- Q: PySide? Qt for Python? what is the name?
- A: The name of the project is Qt for Python and the name of the module is PySide2.
- Q: Why PySide2 and not just PySide?
- A: Since PySide was developed for Qt4, when the port was made to support Qt5, the name was changed to PySide2 to imply that it was a newer version.
- Q: Where I can find information about the old PySide project?
- A: The old wiki page of the project is available on PySide, but the project is deprecated and there is no official support for it. We highly recommend not to use it.
- Q: My project is using PySide, how hard would it be to adapt it to PySide2?
- A: The changes are the same as between Qt4 and Qt5, and for PySide users it mostly means adapting the import statements since many classes were moved from QtGui to QtWidgets.
- Qt 5 is highly compatible with Qt 4. It is possible for developers of Qt 4 applications to seamlessly move to Qt 5 with their current functionality and gradually develop new things, leveraging all the great items Qt 5 makes possible.
- Q: Does PySide2 support Android and iOS development / deployment?
- At the moment there is no support for mobile platforms. It will be looked into in the future.
- Q: Does PySide2 have support for embedded Linux (Raspberry Pi, i.MX6 etc)?
- Not at the moment. It will be looked into in the future.
- Q: There are three wheels (pyside2, shiboken2, and shiboken2_generator) what is the difference between them?
- Before the official release, everything was in one big wheel, but it made sense to split the projects in three different wheels:
- pyside2: contains all the PySide2 module for all the Qt libraries. Also depends on the shiboken2 module.
- shiboken2: contains the shiboken2 module with helper functions for PySide2.
- shiboken2_generator: contains the generator binary that can work with a C++ project and a typesystem to generate Python bindings. Take into account that if you want to generate bindings for a Qt/C++ project, the linking to the Qt shared libraries will be missing, and you will need to do this by hand. We recommend to build PySide2 from scratch to have everything properly linked.
- Before the official release, everything was in one big wheel, but it made sense to split the projects in three different wheels:
- Q: Why shiboken2_generator is not installed automatically?
- It's not necessary to install it to use PySide2. The package is the result of the wheel splitting process. To use the generator it's recommended to build it from scratch to have the proper Qt-linking.
Contributing to the Qt for Python Wiki
This Wiki is a community area where you can easily contribute, and which may contain rapidly changing information. Please put any wiki pages related to Qt for Python into the "QtForPython" category by adding the following text to the top of the page:
[[Category:Qt for Python]]
When creating a new wiki page, please start the name with the prefix "Qt_for_Python/", so all the wiki page names will have the same structure and breadcrumbs are generated for easier navigation.