Skip to content

Commit 4eab812

Browse files
committed
Delay setStyle, prevents crash
1 parent 890a5a8 commit 4eab812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
7979
#endif
8080

8181
// Set theme
82-
QQuickStyle::setStyle("Material");
8382
qputenv("QT_QUICK_CONTROLS_MATERIAL_THEME", QByteArray("Dark"));
8483
qputenv("QT_QUICK_CONTROLS_MATERIAL_ACCENT", QByteArray("#3daee9"));
8584

@@ -95,6 +94,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
9594
QSettings settings(QCoreApplication::organizationName(), QCoreApplication::applicationName().toLower());
9695
#endif
9796

97+
QQuickStyle::setStyle("Material");
9898
// Instantiate app
9999
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
100100
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

0 commit comments

Comments
 (0)