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

QStyleSheetStyle does not use the correct pixel ratio for menu icons

    XMLWordPrintable

Details

    • Windows

    Description

      On Windows 11 with two screens, one scaled at 100% and the other one at 125% , QMenu from Qt 6.5.8 uses icons in different pixel sizes for each screen.
      This behavior is not observed in Qt 6.8.2. QMenu from Qt 6.8.2 uses the same pixel size icon in both screens.

      General steps to reproduce the issue :
      1) Configure the scale setting to 100% in the 1st screen, 125% in the 2nd screen.
      2) Launch Qt Creator in the 1st screen and run the reproducer with Qt 6.5.8.
      3) Place the window in the 1st screen and click the button to show the menu. By the text in the icon, you can detemine which pixel size is used there.
      4) Move the window to the 2nd screen and click the button to check if the same pix size as in the 1st screen is used or not.

      I tried this steps with different settings in display scaling, QT_ENABLE_HIGHDPI_SCALING, and Qt versions (6.5.8 and 6.8.2).
      For details, please refer to the attached exel file.

       

      This issue seems related to QTBUG-92016, but the patch from QTBUG-92016 does not solve the issue in Qt 6.5.8.

      Attachments

        1. iconsize.zip
          2 kB
        2. results.xlsx
          91 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            hitoshiito Hitoshi Ito
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes