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

Device pixel ratio issue with OpenGL graphics API

    XMLWordPrintable

Details

    • Windows

    Description

      When using OpenGL as the graphics API, the window contents will jump up/down 1 pixel when resizing the window (if device pixel ratio > 1).

      This does not happen with Software or Direct3D11 graphics API.

      See attached gif animations for comparison between OpenGL and Direct3D11.

      Steps to reproduce:

      1. Set Microsoft Windows Scaling to for example 200%
      2. Create the default "Qt Quick Application" in QtCreator
      3. In main.qml add anything visible, like a Text
      4. In main.cpp add QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
      5. Run and resize the window vertically

      EDIT: Putting a QQuickWidget anywhere inside a QWidgets application (with above conditions met) will also make all of the window contents to jump up/down when resizing vertically, including all QWidgets even if they are not in any widget layouts. See attachedĀ  file graphicsapi_quickwidgets.gif

      Attachments

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jonaslarsson Jonas Larsson
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: