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

Rendercontrol disfunctional when having both a retina and non-retina screen connected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.4.0 RC
    • 5.4.0
    • Quick: Widget
    • None
    • OS X 10.10

    Description

      qtdeclarative/examples/quickwidgets/qquickviewcomparison only shows a white empty rectangle for the QQuickWidget on the internal, non-retina screen when there is an external high dpi (scaling) screen connected.

      When moving the window to the retina screen, it looks correct. Same happens when the internal screen is retina and the external is not: It works on the retina one but not on the other.

      Same for the QQuickWidget example.

      QOpenGLWidget does not have this problem.

      It is caused by the fact that Quick is calling blindly QWindow::devicePixelRatio(). This approach is wrong when using QQuickRenderControl since the QQuickWindow does not have an actual window and so devicePixelRatio() merely returns some default value which will surely be wrong for one of the screens.

      The correct approach is to use QQuickRenderControl::renderWindowFor.

      Attachments

        Issue Links

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

          Activity

            People

              lagocs Laszlo Agocs
              lagocs Laszlo Agocs
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes