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

background-color needs to be set for QMenuBar::item as well in WindowsVista style to obtain a fully colored menu bar

    XMLWordPrintable

Details

    • 2fe10c8dd02c7a9f37a0993f144f7988618943f0 (qtbase/5.6. 23.4.2016, 5.6.1)

    Description

      The attached example can be used to reproduce the issue.

      Steps to reproduce:
      1. run the example
      2. check the "Menu" item background color

      Expected result:
      The "Menu" item background should be red

      Actual result:
      The "Menu" item background is not red

      As a workaround one can set the stylesheet like this:

      menuBar.setStyleSheet(QStringLiteral("QMenuBar , QMenuBar::item { background-color: rgb(255, 0, 0); }"));
      

      Attachments

        1. qtbug49115_diag.diff
          3 kB
        2. qtbug49115_log_fusion.txt
          0.4 kB
        3. qtbug49115_log_workaround.txt
          0.3 kB
        4. qtbug49115_log.txt
          0.5 kB
        5. qtbug49115.jpg
          qtbug49115.jpg
          15 kB
        6. qtbug49115.zip
          2 kB
        7. qtbug-49115.zip
          1 kB
        For Gerrit Dashboard: QTBUG-49115
        # Subject Branch Project Status CR V

        Activity

          People

            kleint Friedemann Kleint
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes