Details
-
Bug
-
Resolution: Out of scope
-
P1: Critical
-
Release 7
-
None
Description
Reproducible with the "mfc/step3" or "winwidget" example, and opening a dialog while the main window is on a secondary screen. The dialog will open on the first screen.
For 0/0 size widgets, ClientToScreen appears to return invalid values. A workaround/fix is to not give the QWinWidget a 0/0 size in center():
@@ -167,7 +167,7 @@
}
RECT r;
GetWindowRect(hParent, &r);
- setGeometry((r.right-r.left)/2+r.left, (r.bottom-r.top)/2+r.top,0,0);
+ setGeometry((r.right-r.left)/2+r.left, (r.bottom-r.top)/2+r.top,1,1);
}