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

Disabled components are not grayed in Light mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.1, 6.9.0 FF
    • 6.7.0, 6.7.1, 6.7.2
    • GUI: Look'n'Feel
    • None
    • Windows 11
    • Windows
    • ff1273b36 (dev), b51078e92 (6.8), 1d76ab59a (6.7)

    Description

      When starting up a widget with disabled components, they do not appears disabled.

      However changing color mode to dark then to light while the application is up, makes the component grayed.

      Also re-setting the style fix it.

      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
      
          // Fix the issue
          // app.setStyle(app.style()->name());
      
          QWidget widget;
          QVBoxLayout layout(&widget);
      
          QLabel label1("test enabled");
          layout.addWidget(&label1);
      
          QLabel label2("test disabled");
          label2.setEnabled(false);
          layout.addWidget(&label2);
      
          widget.show();
          
          app.exec();
      } 

       

       

      Attachments

        1. dark_theme.png
          dark_theme.png
          6 kB
        2. light_theme.png
          light_theme.png
          6 kB
        For Gerrit Dashboard: QTBUG-128499
        # Subject Branch Project Status CR V

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            alexandre alexandre
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes