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

QLabel pixmap incorrectly scaled on Retina display

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 5.5.1
    • QPA
    • macOS

      When using a QLabel with a .png image assigned to it and "scaledContents" is set with normal DPI display the image is scaled to the size of the QLabel when the size is changed.

      However on a Mac system with retina display, if the window is on the retina display and the size is changed, the image is incorrectly scaled (x2) and only the top left of the image is seen - but magnified x2.

      Moving the window over to a non-retina display causes it to draw correctly. Then moving it back to the retina display it is now drawn correctly.

      To reproduce the issue
      1. Compile and run the attached test application.
      2. Move the window to a Retina display and click "resize".

        1. labeltest.tar.gz
          9 kB
          Kimmo Leppälä
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sorvig Morten Sørvig
            kileppal Kimmo Leppälä
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes