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

QPainter does not honor devicePixelRatio in drawTiledPixmap

    XMLWordPrintable

Details

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

    Description

      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?

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes