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

QIcon ignores high DPI setting on pixmaps

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      tested on mac with hidpi monitor
    • Platform/s:
      All

      Description

      QIcon doc suggests using files to create Hi DPI icons. but if that's not possible, because you programmatically create QPixMaps, or because your existing subsystem uses QPixMaps for everything, or any other valid reason, then it is not possible to create Hi DPI QIcons.

      When attempting to create QIcon from QPixMap, you'd expect to be able to do this:

      qPix->setDevicePixelRatio(devicePixelRatio());
      QIcon icon(qPix);

      and have the aspect ratio to be preserved in the icon, but it is not

      previously reported here, but then ignored for some reason?

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                vgt Eirik Aavitsland
                Reporter:
                davecotter David M. Cotter
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes