Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8
-
None
-
-
b45629207 (dev), 1d5dda7eb (6.8)
Description
The Material style has a theme property that can be set to one of Dark, Light, or System. When the Material.theme is set to Material.System for a control, we expect that when the system theme is changed between light and dark, the control should look dark or light as well. However, nothing happens except closing the application and opening it again. It seems that the System theme is used only when the application starts.
Steps to Reproduce:
- Run the example code.
- Change the system theme between light and dark.
EXPECTED:
- When the system theme is changed, the running example's theme should change to Dark/Light depending on the current system theme.
- If the example is closed and run again, the example's theme should be the same as the system theme.
ACTUAL:
- When the system theme is changed, the running example's theme does not change at all (not expected).
- If the example is closed and run again, the example's theme is the same as the system theme (as expected).
Suggestion:
When the system theme is changed, the Material styles whose themes are set to Material.System should be updated.
The updateTheme() method can be implemented for the QtQuickControls2MaterialStylePlugin to update the material styles.
PS: The Material.theme for the tree view items in the example is deliberately set to Material.System to see what happens when a child attached style follows the system style.
Attachments
Issue Links
- relates to
-
QTBUG-128825 Runtime system theme changes not respected when Theme set to System in qtquickcontrols2.conf
- Reported
-
QTBUG-128444 Universal style theme does not change when the system theme changes
- Closed