Details
-
Epic
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
QML Next: Python
Description
- Background
You can currently use PySide to write QtQuick applications as long as it's possible with C++. PySide offer a mechanism to register QML Elements (singletons, named elements, etc).
The lack of a build step was the motivation to "translate into Python terms" how we could do a runtime registration of QML components, which were addressed with the decorator approach (for example https://doc.qt.io/qtforpython-6/tutorials/qmlintegration/qmlintegration.html )
- Motivation
The recommended approach to achieve a Python <-> QML interaction, requires a lot of code
if __name__ == '__main__': app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine() engine.addImportPath(sys.path[0]) engine.loadFromModule("ModuleName", "Main") if not engine.rootObjects(): sys.exit(-1) sys.exit(app.exec())
But not only that, the QML Elements require a lot of Qt-jargon in order to provide the functionality
- Goal
QML Next is an initiative to make the Qt framework closer to a language-agnostic framework, and for that, the Python integration needs to be re-think, even if it's simple enough.
This epic task is to monitor all the brainstorming about this idea and the Python integration.