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

HighDPI: Setting setHighDpiScaleFactorRoundingPolicy() to PassThrough with fractional scaling yields cosmetic issues with QGraphicsView

    XMLWordPrintable

Details

    Description

      QGraphicsScene fails to properly repaint the regions when setting QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); and using fractional scaling with 4k display.

      A way to reproduce:

      Use Qt's "Drag and Drop Robot" example project for QGraphicsView.

      Add the following lines to the very beginning of main():
      QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
      QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
      QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);

      Set the scaling for the Windows to 150%

      Build and run the application.

      Calling setViewportUpdateMode(QGraphicsView::FullViewportUpdate) on the view will remove this issue.

      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
              foxxx Tuukka Kettunen
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes