Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9
-
None
Description
According to documentation
import QtQuick.Controls
enables run-time style selection (https://doc.qt.io/qt-6/qtquickcontrols-styles.html#run-time-style-selection)
However importing style later, e.g. QtQuick.Controls.Universal causes style change anyways. Moreover when imported in another file, leads to mixture of two styles.
When there is style import, also QQuickStyle::setStyle call and QT_QUICK_CONTROLS_STYLE are ignored. The last import takes precedence.
Another issue is that for compile-time style selection the necessity of using file selectors to adjust specific types is not well documented. It's somehow presented in Gallery Controls example but even there it looks like not handy workaround rather then systematic solution.
In comparison to Qt5 handling multiple styles seem to be quite problematic and lack of explicit documentation leads to various unexpected behaviors.