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

QPainter does not honor devicePixelRatio in drawTiledPixmap

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 5.11.2
    • GUI: Painting
    • None
    • Linux/X11

      I am using QT_SCALE_FACTOR=2 to simulate a high DPI environment.

      By default, all pixmaps are scaled up by a factor two. According to the documentation, it should be possible to draw images and pixmaps at their 'native' size (one image pixel == one screen pixel) by calling setDevicePixelRatio with the devicePixelRatio of the widget. This does indeed work for drawPixmap, but not for drawTiledPixmap - in that case setDevicePixelRatio seems to have no effect whatsoever.

      Repeating the test with QT_SCREEN_SCALE_FACTORS instead of QT_SCALE_FACTOR produces the same result. Qt::AA_UseHighDpiPixmaps doesn't make any difference, it only changes the appearance of icons (from QIcon).

      Am I missing something?

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

            vgt Eirik Aavitsland
            maarten baert Maarten Baert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes