Saving app's window position - on multiple monitors and scaled Windows 10
-
Hi,
I am using Qt 5.14.0. If I have two monitors next to each other running Windows 10, both at 200% scaling, I get strange behavior with my application.
A feature of my app is that it remembers the x and y coordinates of the application. This way, the next time the user opens it, it will appear at the same place. This works fine if I open the app on my main monitor, close it, and then reopen. It will appear at the exact same coordinates. However, if I instead move it to my second (non-main) monitor, close it there, and then reopen, the app will not open exactly where I closed it. Instead, the coordinates have been changed a little bit. In some cases this is enough for the application to open outside of the monitor, making it "invisible".
A few examples:
- If main monitor is 100% and second is 175%
Opening and closing on main monitor keeps the same x and y coordinates. However, opening and closing on second monitor changes x and y coordinates.
-
If both main and second monitor are 175%
Same result as above -
If both main and second monitor are 100%
Works as intended. Opening and closing on either monitor keeps the same x and y coordinates.
Has anyone encountered similar issues?
- If main monitor is 100% and second is 175%
-
Hi, I have the same problem but on a Widget App :) so maybe one of you can still help?