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

Unexpected pixmap from an icon on a HiDPI screen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.9.5, 5.9.7
    • None
    • macOS Mojave (10.14)
    • macOS

    Description

      If you run the attached program on a "normal" screen, i.e. with a device pixel ratio of 1, then everything will be as expected. However, if you run it on a HiDPI screen, e.g. with a device pixel ratio of 2, then QIcon::pixmap() doesn't return the expected pixmap when Qt::AA_UseHighDpiPixmaps is set (look at the top right icon). The icon looks blurry, which is annoying when you need both a plain version of an icon and another with an overlaid icon, since they look different (besides the overlay).

      Note: regarding the icons when Qt::AA_UseHighDpiPixmaps is set, I would actually expect them to be of better quality and they are in my application, but for some reasons they are not in this sample application. Still, the point I want to raise is with regards with "normal" vs. HiDPI screens and Qt::AA_UseHighDpiPixmaps set.

      Attachments

        1. HiDPIScreen.png
          HiDPIScreen.png
          121 kB
        2. HighDPI.zip
          3 kB
        3. image-2020-03-09-20-03-03-949.png
          image-2020-03-09-20-03-03-949.png
          138 kB
        4. NormalScreen.png
          NormalScreen.png
          39 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            agarny Alan Garny
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes