Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92258

Support declarative type registration without declarative dependency

    XMLWordPrintable

Details

    • fa1ba8ed8e6abe66076a858f3d390c28f08441f3 (qt/qtdeclarative/dev)

    Description

      Currently, the declarative type registration macros live in qqml.h. If a library does not want to depend on QtQml but still offer QML integration, it thus has to currently do the following:

      1. Use normal QObjects/QGadgets and enable metatypes.json generation
      2. Create a declarative helper library, which creates wrapper structs and uses QML_FOREIGN to register the types from the main library

      If we move the macros out of QtQml, we could already use them in step 1. Then, instead of manually creating the structs in step 2, we could just automate this with qmltyperegistrar.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-92258
          # Subject Branch Project Status CR V

          Activity

            People

              fabiankosmale Fabian Kosmale
              fabiankosmale Fabian Kosmale
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes