summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/extras/flat/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/quick/extras/flat/main.cpp b/examples/quick/extras/flat/main.cpp
index 8faafdca7..57f48cda2 100644
--- a/examples/quick/extras/flat/main.cpp
+++ b/examples/quick/extras/flat/main.cpp
@@ -47,7 +47,12 @@ int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
if (qgetenv("QT_QUICK_CONTROLS_STYLE").isEmpty()) {
+#ifdef QT_STATIC
+ // Need a full path to find the style when built statically
+ qputenv("QT_QUICK_CONTROLS_STYLE", ":/ExtrasImports/QtQuick/Controls/Styles/Flat");
+#else
qputenv("QT_QUICK_CONTROLS_STYLE", "Flat");
+#endif
}
QQmlApplicationEngine engine;
engine.load(QUrl("qrc:/main.qml"));