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

High DPI: repaint artefacts for widgets in a QGraphicsScene

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Duplicate
    • Affects Version/s: 5.6.0, 5.6.1, 5.7.0
    • Fix Version/s: 5.10.0 Alpha
    • Component/s: Widgets: GraphicsView
    • Labels:
      None

      Description

      Repro:

      main.cpp
      #include <QApplication>
      
      #include <QLineEdit>
      #include <QGraphicsScene>
      #include <QGraphicsView>
      int main(int argc, char *argv[])
      {
          QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
          QApplication app(argc, argv);
      
          QLineEdit edit;
          QGraphicsScene *dummyScene = new QGraphicsScene();
          dummyScene->addWidget(&edit);
          QGraphicsView *view = new QGraphicsView(dummyScene);
      
          view->show();
      
          return app.exec();
      }
      

      Move the window to a monitor with high DPI (for example 200%).
      Click in the text edit and start typing slowly (for example a few "i")
      See: the area around the cursor is not repainted correctly when the cursor blinks.

      It seems that the exposed area invalidated in the graphics scene is correct, but the clip area used in the widget render is wrongly scaled by QWidgetPrivate::setSystemClip, so that it won't match the invalidation rectangle, leaving some blank areas.

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                mmutz Marc Mutz
                Reporter:
                bizcot Marco Francescangeli
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes