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

Qml module version influences fallback style version

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • 6.5
    • 6.5.0
    • QML: Tooling
    • None
    • Linux/X11

    Description

      When creating a custom qml style with a fallback style, using the following cmake command, then the version of QtQuick.Controls.Material that the style falls back to is module version (1.0), instead of the expected latest qt quick version installed (6.5) and we get an error.

      Cmake command:

      qt_add_qml_module(BDAQtQuickMaterialComponents
          URI BDAQtQuickMaterialComponents
          VERSION 1.0
          DEPENDENCIES QtQuick/auto
          OUTPUT_TARGETS BDAQTQUICKMATERIALCOMPONENTS_EXTRA_INSTALL_TARGETS
          QML_FILES
              Button.qml
          SOURCES
          RESOURCES
          IMPORTS
              QtQuick.Controls.Material/auto
      )

      Error:

      file://source_path/DeleteDummy.qml: module "QtQuick.Controls.Material" version 1.0 is not installed ( in file://source_path/DeleteDummy.qml::)
      file://source_path/DeleteDummy.qml: Failed to load dependent import "QtQuick.Controls.Material" version 1.0 ( in file://source_path/DeleteDummy.qml::)
      

      Generated qmldir file:

      module BDAQtQuickMaterialComponents
      linktarget BDAQtQuickMaterialComponentsplugin
      optional plugin BDAQtQuickMaterialComponentsplugin
      classname BDAQtQuickMaterialComponentsPlugin
      typeinfo BDAQtQuickMaterialComponents.qmltypes
      import QtQuick.Controls.Material auto
      depends QtQuick auto
      prefer :/BDAQtQuickMaterialComponents/
      Button 1.0 Button.qml

       

      Fixing the version with QtQuick.Controls.Material/6.5 fixes this problem though.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            friendnick Mykola Vankovych
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes