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

QIcon::fromTheme selects 32px icon instead of 16@2x with devicePixelRatio 2

    XMLWordPrintable

Details

    • All
    • c5c6df40b (dev), 0a8737901 (6.9), a63036fd4 (6.8)

    Description

      When drawing QIcon in 16x16 rect with 2.0 devicePixelRatio, it chooses 32px icon instead of 16@2x icon despite it being present in the theme.

      Both 6.8.2 and current dev (23a4b586f7137a86028e731dbaf800b1ebcf738a) are afftected.

      Steps to reproduce:
      1. Compile sample project from attachment
      2. Run it with QT_SCALE_FACTOR=2

      Expected result: green circle (16@2x icon) should shown in the window

      Actual result: red circle (32 icon) is shown in the window

      Attachments

        For Gerrit Dashboard: QTBUG-135159
        # Subject Branch Project Status CR V

        Activity

          People

            chehrlic Christian Ehrlicher
            equeim Alexey
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes