Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.5.1, 5.6.0, 5.6.1, 5.7.0, 5.7.1, 5.7.2, 5.8
-
None
Description
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.
Attachments
For Gerrit Dashboard: QTBUG-47917 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
175007,1 | QQuickWindow: register versions 2.1 and 2.2 | 5.8 | qt/qtdeclarative | Status: NEW | -1 | 0 |