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

New properties/signals QtQuick.Window are unknown to Qt Creator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • 5.5.1, 5.6.0, 5.6.1, 5.7.0, 5.7.1, 5.7.2, 5.8
    • Build tools: Other
    • None

      Qt Creator underlines any signal or property added in newer versions of the "Window" type from the "QtQuick.Window 2.x" import.

      This is probably because the implementation of QQuickWindow changed for QtQuick.Window 2.1 import. From qmltypes file:

         Component {
              name: "QQuickWindow"
              defaultProperty: "data"
              prototype: "QWindow"
              exports: ["QtQuick.Window/Window 2.0"]
              exportMetaObjectRevisions: [0]
              // ..
              Signal {
                  name: "closing"
                  revision: 1
                  Parameter { name: "close"; type: "QQuickCloseEvent"; isPointer: true  }
              }
              
              // ..    
          Component {
              name: "QQuickWindowQmlImpl"
              defaultProperty: "data"
              prototype: "QQuickWindow"
              exports: ["QtQuick.Window/Window 2.1", "QtQuick.Window/Window 2.2"]
              exportMetaObjectRevisions: [0, 1]
              attachedType: "QQuickWindowAttached"
              Property { name: "visible"; type: "bool" }
              Property { name: "visibility"; type: "Visibility" }
              Signal {
                  name: "visibleChanged"
                  Parameter { name: "arg"; type: "bool" }
              }
              Signal {
                  name: "visibilityChanged"
                  Parameter { name: "visibility"; type: "QWindow::Visibility" }
              }
          }
      

      So newer properties and signals for QtQuick.Window are implemented still in the "QQuickWindow" component, but made available through the "QQuickWindowQmlImpl" component, with "QQuickWindow" as a prototype.

      The result of this is that Qt Creator warns about an 'onClosing' handler not being available, but knows about the 'onVisibleChanged' signal.

        1. QTBUG-47917.7z
          0.9 kB
          Kai Köhne
        For Gerrit Dashboard: QTBUG-47917
        # Subject Branch Project Status CR V

            mabenell Marco Benelli
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There is 1 open Gerrit change