Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.5
-
None
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.