Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
2248487c6ca9d5459c70a16868d5aeee07d96157 (qt/qtbase/dev) 77659e03393820daace991c28021cfb8b67f871a (qt/qtbase/6.2)
Description
There are a couple of ways that we're checking which system theme is in use:
- https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/libs/utils/theme/theme.cpp?id=d0f8fdff0d5762a212a4532973f9fefdf57aa4d7#n246
- https://code.qt.io/cgit/qt/qtquickcontrols2.git/tree/src/quickcontrols2/qquickstyle.cpp?id=40e92d86a7601b06a83c5cbc44c85847d1cb46f7#n413
Having a QPA API for this would be much better.
We could do this by adding e.g. a SystemTheme enum to QPlatformTheme:
enum SystemTheme {
DarkTheme,
LightTheme,
OtherTheme
};
Attachments
Issue Links
- is required for
-
QTBUG-74210 It would be nice if there is an api to detect what mode is active (Dark/light)
- Closed
- relates to
-
QTBUG-68850 Qt Applications are not usable under macOS Mojave with dark theme
- Closed
-
QTBUG-83908 Material.System does not work on Windows 10 in Dark Mode
- Closed
-
QTBUG-93815 Dark mode does not work when theme Material.System is used
- Closed
-
QTBUG-93955 Material.System does not work on Ubuntu (Gnome)
- Closed
-
QTBUG-72028 Add support for Windows dark mode
- Closed
-
QTBUG-78913 Material.System should follow system theme on Android Q and up
- Closed
-
QTBUG-97910 Support runtime theme switching
- Reported
-
QTBUG-88043 Event informing that the device has switched to Night(Dark) mode or vice versa
- Closed