Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.5
-
c0a01a72f0 (qt/qtdeclarative/dev) bd85c0fdc4 (qt/qtdeclarative/6.4) bd85c0fdc4 (qt/tqtc-qtdeclarative/6.4) 3902defd6e (qt/tqtc-qtdeclarative/6.2)
Description
The code below works fine with qml from Qt5/Qt6,
but qmllint (recent dev) reports such warnings:
$ qmllint MyPopup.qml Warning: MyPopup.qml:6:5: unknown attached property scope T. T.Overlay.modal: Rectangle { color: "red" } ^ Warning: MyPopup.qml:6:5: 'T' is used but it is not resolved T.Overlay.modal: Rectangle { color: "red" } ^
MyPopup.qml
import QtQuick.Controls 2.15 import QtQuick.Templates 2.15 as T import QtQuick 2.15 T.Popup { T.Overlay.modal: Rectangle { color: "red" } }
main.qml (to run code with qml):
import QtQuick 2.15 import QtQuick.Controls 2.15 Item { width: 100 height: 100 Button { text: "HI" onClicked: { console.log("click"); popup.open(); } } MyPopup { id: popup width: 200 height: 300 modal: true Text { text: "popup" anchors.fill: parent } closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent } }