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

QtQuick.Controls": Cannot protect module QtQuick.Controls 2 as it was never registered

    XMLWordPrintable

Details

    Description

      The following imports

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      import QtQuick.Window 2.12
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
          objectName: "appwin"
      
          Column {
              spacing: 20
              Button {
                  text: "Show Dialog1"
                  objectName: "button1"
                  onClicked: dialog1.open()
              }
      
              Button {
                  text: "Opens dialog2"
                  Dialog {
                      id: dialog2
                      title: "Dialog2"
                      objectName: "dialog2"
                      x: 100
                      y: 200
                      width: 200
                      height: 200
                      focus: true
                      closePolicy: Popup.CloseOnEscape | Popup.NoAutoClose
      
                      Component.onCompleted: print(parent)
      
                      MouseArea {
                          objectName: "MouseArea2"
                          onClicked: dialog2.forceActiveFocus()
                          width: 200
                          height: 200
                          Text {
                              text: dialog2.activeFocus ? "has active focus" : ""
                          }
                          focus: true
                          Keys.onPressed: console.log("dialog2 key pressed 0x" + event.key.toString(16))
                      }
                  }
              }
          }
      
          Dialog {
              id: dialog1
              objectName: "dialog1"
              title: "Dialog1"
              x: 200
              y: 100
              width: 200
              height: 200
              focus: true
              closePolicy: Popup.CloseOnEscape | Popup.NoAutoClose
              MouseArea {
                  onClicked: dialog1.forceActiveFocus()
                  objectName: "MouseArea1"
                  focus: true
                  width: 200
                  height: 200
                  Text {
                      text: dialog1.activeFocus ? "has active focus" : ""
                  }
      
                  Keys.onPressed: console.log("dialog1 key pressed 0x" + event.key.toString(16))
              }
          }
      }
      

      result in

      plugin cannot be loaded for module "QtQuick.Controls": Cannot protect module QtQuick.Controls 2 as it was never registered
      

      when running with Qt built yesteday on dev.

      Reordering the imports doesn't help.

      I tried to cherry-pick https://codereview.qt-project.org/c/qt/qtdeclarative/+/288799 to see if it would help, but ran into merge conflicts and got distracted...

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes