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

[Reg 6.4->6.5] QMenu no longer renders disabled text correctly

    XMLWordPrintable

Details

    • Windows
    • 491534006 (dev), c8c3c4406 (6.6), 218d7a9c2 (6.5)

    Description

      Code

      #include <QtWidgets>
      
      int main(int argc, char** argv)
      {
          QApplication app(argc, argv);
          QMainWindow w;
      
          auto menu_e = w.menuBar()->addMenu("Enabled Menu");
          w.menuBar()->addMenu("Disabled Menu")->setDisabled(true);
      
          QIcon icon(":/qt_logo.png");
          menu_e->addAction(icon, "Enabled");
          menu_e->addAction(icon, "Disabled")->setDisabled(true);
      
          w.resize(300, 150);
          w.show();
      
          return app.exec();
      }
      

       

      Expected outcomes (Qt 6.4.3 and older)
      Disabled menu items have their icons and text greyed out

       

      Actual outcomes
      Disabled menu items have their icons greyed out, but their text look "enabled"

      Attachments

        1. menus-bad.png
          6 kB
          Sze Howe Koh
        2. menus-good.png
          7 kB
          Sze Howe Koh
        3. Notepad_dark.png
          13 kB
          Breanna Ammons
        4. Notepad_light.png
          13 kB
          Breanna Ammons
        5. Notepad++.png
          16 kB
          Breanna Ammons
        6. Paint.png
          15 kB
          Breanna Ammons
        7. qtbug-114821.zip
          4 kB
          Sze Howe Koh
        8. screenshot-1.png
          17 kB
          Axel Spoerl

        Issue Links

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

          Activity

            People

              santhoshkumar Santhosh Kumar Selvaraj
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes