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

Research Hybrid Elements

    XMLWordPrintable

Details

    Description

      Sometimes you want to create a QML element, but need a specific piece of C++ functionality (like Attached properties for example). It should be possible to create a QQuickItem subclass which loads a template QML file on top of itself, and then it can be subclassed to create a hybrid Item. E.g. MyItem would load MyItem.qml which would effectively have a C++ MyItem for a root and yet when the module is imported and MyItem created the QML file is instantiated with the C++ MyItem as a root.

      Currently this is quite simple if you just use different names for the C++ base and the QML file. But it should be possible to have it with the same name, so as to implicitly add C++ features to a type originally written with QML, or vice-versa.

      Attachments

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

        Activity

          People

            aalpert Alan Alpert
            aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes