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

[hidpi] threaded renderer uses process DPI not window DPI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.5
    • None
    • Windows

    Description

      Running Qt in a DPI aware plugin window in a DPI unaware host process with threaded rendering on Windows causes the UI to be cutoff and offset (see pictures below).

      We observed that turning off threaded rendering resolves the issue. We also identified that the QSGRenderThread uses the process DPI awareness. As a workaround, we've hooked into QQuickWindow's beforeSynchronizing signal with a direct connection to be able to set the correct DPI awareness context on the QSGRenderThread. This seems to fix the problem, but only after the window has been moved by the user. The initial render is still offset and cutoff. Triggering QQuickWindow::update or requestUpdate after the correct DPI awareness context is set didn't help.

      From the Windows documentation it seems to be valid to have several different DPI awareness contexts in a single app. It is recommended to set the correct DPI context in each thread.

       

      Attachments

        1. fix.patch
          3 kB
        2. Raum_correct.png
          Raum_correct.png
          967 kB
        3. Raum_Live10_Cutoff.png
          Raum_Live10_Cutoff.png
          494 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owolff Oliver Wolff
            marcel.gotsch Marcel Gotsch
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes