aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/quickcontrols2/gallery/gallery.cpp1
-rw-r--r--examples/quickcontrols2/gallery/gallery.qml2
2 files changed, 2 insertions, 1 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.cpp b/examples/quickcontrols2/gallery/gallery.cpp
index 90b63cac..bfbdb49c 100644
--- a/examples/quickcontrols2/gallery/gallery.cpp
+++ b/examples/quickcontrols2/gallery/gallery.cpp
@@ -60,6 +60,7 @@ int main(int argc, char *argv[])
QQuickStyle::setStyle(settings.value("style").toString());
QQmlApplicationEngine engine;
+ engine.rootContext()->setContextProperty("availableStyles", QQuickStyle::availableStyles());
engine.load(QUrl("qrc:/gallery.qml"));
if (engine.rootObjects().isEmpty())
return -1;
diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml
index 97985a6d..06e7fc06 100644
--- a/examples/quickcontrols2/gallery/gallery.qml
+++ b/examples/quickcontrols2/gallery/gallery.qml
@@ -254,7 +254,7 @@ ApplicationWindow {
ComboBox {
id: styleBox
property int styleIndex: -1
- model: ["Default", "Material", "Universal"]
+ model: availableStyles
Component.onCompleted: {
styleIndex = find(settings.style, Qt.MatchFixedString)
if (styleIndex !== -1)