Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-127169

Material style theme does not change when the system theme changes

    XMLWordPrintable

Details

    • All
    • 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:

      1. Run the example code.
      2. 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mhqanbari MohammadHossein Qanbari
              mhqanbari MohammadHossein Qanbari
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes