Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2878

QMLBridges/formerly QML Next: Python

    XMLWordPrintable

Details

    • Epic
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • PySide
    • None
    • QML Next: Python

    Description

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

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

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

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              crmaurei Cristian Maureira-Fredes
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes