Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109293 qmltc: collection task for missing support in qmltc
  3. QTBUG-105898

Teach views/QQmlComponent how to use qmltc's generated classes

    XMLWordPrintable

Details

    Description

      Teach the views how to instantiate their delegates using qmltc's generated code.

      A bridge between QQmlComponent and qmltc is needed, so that QQmlComponent can do what the user code would usually do when instantiating objects.

      For example:

      // Main.qml
      Window {
          id: root
          width: 800
          height: 600
          visible: true
          
          Component {
              id: myComp1
              MyType {} // should use qmltc-compiled code, if MyType was processed by qmltc!
          }
          Component.onCompleted: {
              let myComp2 = Qt.createComponent("MyType.qml") // should use qmltc-compiled code if possible(?)
              
              let obj1 = myComp1.createObject(root)
              let obj2 = myComp2.createObject(root)
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              sami.shalayel Sami Shalayel
              sami.shalayel Sami Shalayel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes