Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6.3
-
None
Description
Just by creating a new widgets or qtquickapp, you can register an eventFilter and catch the eventType, and you will see you will always get it twice in a row for every theme change.
Here is a small example:
// MainWindow.h bool eventFilter(QObject *obj, QEvent *event) override { if (event->type() == QEvent::ThemeChange) { qDebug() << QGuiApplication::styleHints()->colorScheme(); return true; } return QObject::eventFilter(obj, event); }; //main.cpp QApplication a(argc, argv); MainWindow w; a.installEventFilter(&w); w.show(); return a.exec();