Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.4.0
-
None
Description
Hi,
I am trying to select a style at runtime with Qt Quick Controls like documented below (with environment variable or command option)
https://doc.qt.io/qt-6/qtquickcontrols2-styles.html#run-time-style-selection
1) If I try in Qt Creator to set the environment variable QT_QUICK_CONTROLS_STYLE=material I got the following error
QQmlApplicationEngine failed to load component
qrc:/Styles/main.qml: module "basic" is not installed.
Same if I set the env var in C++ with qputenv(). Problem solved with qputenv("QT_QUICK_CONTROLS_STYLE", "QtQuick.Controls.Material");
2) Same for the command line option -style. When adding in the Projects > Run Settings a command line argument I need to put -style QtQuick.Controls.Material and not -style material.
Maybe the documentation could be updated accordingly.