diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8f806175c23..27bf04da741 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2605,6 +2605,7 @@ void QGuiApplicationPrivate::processSafeAreaMarginsChangedEvent(QWindowSystemInt void QGuiApplicationPrivate::processThemeChanged(QWindowSystemInterfacePrivate::ThemeChangeEvent *tce) { + QStyleHintsPrivate::get(QGuiApplication::styleHints())->setColorScheme(colorScheme()); if (self) self->handleThemeChanged(); @@ -2614,8 +2615,6 @@ void QGuiApplicationPrivate::processThemeChanged(QWindowSystemInterfacePrivate:: const QWindowList windows = tce->window ? QWindowList{tce->window} : window_list; for (auto *window : windows) QGuiApplication::sendSpontaneousEvent(window, &themeChangeEvent); - - QStyleHintsPrivate::get(QGuiApplication::styleHints())->setColorScheme(colorScheme()); } /*!