Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-28375

QtObject not recognized when using a Qt 6.4 kit

XMLWordPrintable

    • 5935536b7 (master), 90b8e482c (qds/dev)

      If using a Qt 6.4 kit QtObject is not recognized.

      Adding an import for QtQml does not fix it.

      import QtQml
      

      Resetting the QML code model does fix it, but is inconvenient.

      Types based on QtObject throughout the project are also incomplete until the code model is reset.

      This can be fixed by editing the builtins.qmltypes file in the Qt 6.4 kit.

      If we use the same exports as in Qt 6.3 everything does work again.

      Component {
              file: "private/qqmlengine_p.h"
              name: "QObject"
              extension: "Object"
              accessSemantics: "reference"
              //exports: ["QML/QtObject 1.0"]
              exports: ["QtQml/QtObject 2.0", "QtQml/QtObject 6.0"]
              exportMetaObjectRevisions: [256]
              Property {
                  name: "objectName"
                  type: "QString"
                  bindable: "bindableObjectName"
                  read: "objectName"
                  write: "setObjectName"
                  notify: "objectNameChanged"
                  index: 0
              }
      
      
      

        1. screenshot-1.png
          26 kB
          Thomas Hartmann
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sami.shalayel Sami Shalayel
            thohartm Thomas Hartmann
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes