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

Support declarative type registration without declarative dependency

XMLWordPrintable

    • fa1ba8ed8e6abe66076a858f3d390c28f08441f3 (qt/qtdeclarative/dev)

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes