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

        1. updatewidget.zip
          2 kB
          Morten Sørvig

        Issue Links

          Activity

            People

              vgt Eirik Aavitsland
              foxxx Tuukka Kettunen
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: