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

qmllint: unknown attached property scope T.

    XMLWordPrintable

Details

    • 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
              }
      }
      

      Attachments

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

        Activity

          People

            max.goldstein Maximilian Goldstein
            evgeniy_dushistov evgeniy_dushistov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes