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

[Reg 6.5->6.7] Menu display problem Windows 11 dark mode.

    XMLWordPrintable

Details

    • Windows
    • 2ced94b41 (dev), 31367fd2c (6.8)

    Description

      When running a Qt Widgets application on Windows 11 with the operating system visual mode set to "dark", and with the Qt Widgets application forced to light mode using

          qputenv("QT_QPA_PLATFORM", "windows:darkmode=0");

      the Qt application's menu items are dark and unreadable. See attached photo.

      To reproduce,

      • set the Windows 11 mode to dark
      • in Qt Creator
        • create a fresh Qt Widgets in Qt Creator
        • add a menu and menu item
        • then at the top of main() function, add
          • qputenv("QT_QPA_PLATFORM", "windows:darkmode=0");
        • compile and run

       

      This menu problem is in Qt 6.7.2 but not present in Qt 6.5.5.

       

      Attachments

        1. dark_mode_styles.zip
          6 kB
        2. qt menu problem.jpg
          qt menu problem.jpg
          1.74 MB
        3. screenshot-1.png
          screenshot-1.png
          20 kB
        4. screenshot-2.png
          screenshot-2.png
          18 kB
        5. screenshot-3.png
          screenshot-3.png
          27 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mjsmithers Michael Smithers
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes