aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/quickcontrols2/gallery/gallery.cpp6
-rw-r--r--examples/quickcontrols2/gallery/gallery.qml2
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.cpp b/examples/quickcontrols2/gallery/gallery.cpp
index b4d59685..bbcd2d14 100644
--- a/examples/quickcontrols2/gallery/gallery.cpp
+++ b/examples/quickcontrols2/gallery/gallery.cpp
@@ -73,7 +73,11 @@ int main(int argc, char *argv[])
QQuickStyle::setStyle(settings.value("style").toString());
QQmlApplicationEngine engine;
- engine.rootContext()->setContextProperty("availableStyles", QQuickStyle::availableStyles());
+
+ const QStringList builtInStyles = { QLatin1String("Default"), QLatin1String("Fusion"),
+ QLatin1String("Imagine"), QLatin1String("Material"), QLatin1String("Universal") };
+ engine.rootContext()->setContextProperty("builtInStyles", builtInStyles);
+
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 f76315cc..872bdb44 100644
--- a/examples/quickcontrols2/gallery/gallery.qml
+++ b/examples/quickcontrols2/gallery/gallery.qml
@@ -287,7 +287,7 @@ ApplicationWindow {
ComboBox {
id: styleBox
property int styleIndex: -1
- model: availableStyles
+ model: builtInStyles
Component.onCompleted: {
styleIndex = find(settings.style, Qt.MatchFixedString)
if (styleIndex !== -1)