-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.4.0
-
None
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.
For Gerrit Dashboard: QTBUG-112453 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
606445,2 | Docs: Qt Quick Controls style selection at runtime has faulty examples | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
606595,2 | Docs: Qt Quick Controls style selection at runtime has faulty examples | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |