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

"module "QtQuick.Templates" is not installed" when some files' QML imports specify version and some don't

    XMLWordPrintable

Details

    Description

      With my example Qt Quick App I get the following error:

      QQmlApplicationEngine failed to load component
      qrc:/main.qml:10:9: Type Button unavailable
      qrc:/MyStyle/Button.qml:40:1: module "QtQuick.Templates" is not installed
      

      In MyStyle/Button.qml, the imports are without versions:

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Controls.impl
      import QtQuick.Templates as T
      

      However, in main.qml:

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      

      This is clearly a mismatch on the app's side, but perhaps it should still work.

      Module SHA-1s:

      Entering 'qtbase'
      commit 7c861a36f98972b64379589477930e2e894b0d72
      Entering 'qtdeclarative'
      commit 02caa659dad5e28b95029e28a40912cabeaf6a9b
      Entering 'qtquickcontrols2'
      commit 28373abd5a6344c3c6d8b173c373657dd0d95707
      

      Note that for qtquickcontrols2 you have to checkout https://codereview.qt-project.org/c/qt/qtquickcontrols2/+/307865/ and then cherry-pick https://codereview.qt-project.org/c/qt/qtquickcontrols2/+/308053 on top.

      Attachments

        Issue Links

          Activity

            People

              ulherman Ulf Hermann
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: