Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
6.5.0
-
None
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.