PySide2: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
[[Category:PySide]]
[[Category:PySide]]
== Qt for Python ==
== 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 [https://github.com/PySide 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 [https://groups.google.com/forum/#!topic/pyside-dev/pqwzngAGLWE details] ).


The Pyside 2 project aims to provide a complete port of [[PySide]] to Qt 5.x. The development started on [https://github.com/PySide 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 [https://groups.google.com/forum/#!topic/pyside-dev/pqwzngAGLWE details] ).
This wiki page tracks the progress of the '''Qt for Python''' project development and provides further information concerning the effort.
 
This wiki page tracks the progress of PySide for Qt 5.x development and provides further information concerning the effort.


== Getting Started ==
== Getting Started ==
Line 14: Line 13:
** ssh://codereview.qt-project.org/pyside/pyside-setup  
** ssh://codereview.qt-project.org/pyside/pyside-setup  
* [[PySide2_Development_Getting_Started|Development: Getting started]]
* [[PySide2_Development_Getting_Started|Development: Getting started]]
* [https://doc-snapshots.qt.io/qtforpython/ Official documentation (''in progress'')]
== How does '''Qt for Python''' look like? ==
<syntaxhighlight lang="python" line='line'>
import sys
from PySide2.QtWidgets import QApplication, QLabel
                                                   
if __name__ == "__main__":
    app = QApplication([])
    label = QLabel("Hello World")
    label.show()
    sys.exit(app.exec_())
</syntaxhighlight>


More examples can be found in the [http://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples project's repository] inside the '''examples''' directory.
== Community ==
== Community ==


Line 39: Line 53:
=== Missing PySide2 bindings ===
=== Missing PySide2 bindings ===


The list of the current missing bindings can be found in:
The list of the current missing bindings can be found in [[PySide2_Missing_Bindings|Missing PySide2 bindings]]
* [[PySide2_Missing_Bindings|Missing PySide2 bindings]]


=== Outstanding tasks for release ===
=== Outstanding tasks for release ===
# Determine Pyside package number
 
# Determine PySide2 package number
# Ensure multi target packages can be created (long standing - reduced Python API usage )
# Ensure multi target packages can be created (long standing - reduced Python API usage )
# General Doc changes required for release
# General Doc changes required for release
Line 52: Line 66:
## snapshot generation on http://doc-snapshot.qt-project.org/
## snapshot generation on http://doc-snapshot.qt-project.org/


=== Backlog ===
== Frequently Asked Questions ==
 
The list below represents some short term targets and long term ideas for Pyside2 development. There is no guarantee that this will happen as written down. It is meant as a short reminder and idea collection for future development. In the long term this list is likely to move to https://bugreports.qt.io/browse/PYSIDE.
 
# First time with Pyside (Document how to get started on this wiki)
# Testing Infrastructure
## What has been done so far?
## Qt CI support ([https://bugreports.qt.io/browse/PYSIDE-431 PYSIDE-431])
### make test
### cmake based build system (all repos)
### pip installable Pyside
#### CI has to setup virtual Python environment
#### Use pip to install/build Pyside (release bundling)
 
# Future changes to PySide
## Gaps (modules & API)
### Identify the extent of the gaps by porting existing examples from Qt4 to Qt5 (done)
### Plugin system (in what form or shape do we need it is uncertain - some failing tests exist already)
### Prepare a summary of gaps for other modules
## Fundamental Architecture changes
### Shiboken
#### Clang support ([https://bugreports.qt.io/browse/PYSIDE-323 PYSIDE-323])
### QtQML support ([https://bugreports.qt.io/browse/PYSIDE-355 PYSIDE-355])
## MyPy (type annotation - fully typed Python API)
## General Python features and their adoption in PySide (e.g. Async I/O)
## Creator and tooling
### Fix QtC debugger to understand Python/C++ mixed internals
## Documentation generation
## Deployment of apps
## Debugging support


# Must have tasks for first release
* Q: PySide? Qt for Python? what is the name?
## Packaging (e.g. pip deployment? )
** A: The name of the project is '''Qt for Python''' and the name of the module is '''PySide2'''.
## Clarify Installer story
* Q: Why PySide2 and not just PySide?
## Documentation
** A: Since PySide was developed for Qt4, when the port was made to support Qt5, the name was change to PySide2 to infer that is was a newer version.
## Product placement decisions
* Q: Where I can find information about the old PySide project?
### Licensing
** 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 to not use it.
### Naming
* Q: My project is using PySide, how hard would it be to adapt it to PySide2?
### etc
** A: The changes are the same between [https://doc.qt.io/qt-5/qt5-intro.html Qt4 and Qt5], and for PySide users means mostly on adapting the ''import'' statement, since many classes were moved from QtGui to QtWidgets.
## Complete CI coverage
::''Qt 5 is highly compatible with Qt 4. It is possible for developers of Qt 4 applications to seamlessly move on to Qt 5 with their current functionality and gradually develop new things leveraging all the great items Qt 5 makes possible.
''

Revision as of 11:09, 11 April 2018

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

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

This wiki page tracks the progress of the Qt for Python project development and provides further information concerning the effort.

Getting Started

How does Qt for Python look like?

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

More examples can be found in the project's repository inside the examples directory.

Community

Development Status

Weekly development progress

The summary of the development progress can be found in Development Notes by date

Pyside Development Progress Notes

The most current view of the progress can be found in Jira:

  1. Unresolved issues
  2. 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 can be found in Missing PySide2 bindings

Outstanding tasks for release

  1. Determine PySide2 package number
  2. Ensure multi target packages can be created (long standing - reduced Python API usage )
  3. General Doc changes required for release
    1. Getting started
    2. Some examples documented
    3. pyinstaller usage
    4. Class documentation polish
    5. snapshot generation on http://doc-snapshot.qt-project.org/

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 change to PySide2 to infer that is 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 to not use it.
  • Q: My project is using PySide, how hard would it be to adapt it to PySide2?
    • A: The changes are the same between Qt4 and Qt5, and for PySide users means mostly on adapting the import statement, 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 on to Qt 5 with their current functionality and gradually develop new things leveraging all the great items Qt 5 makes possible.