1 Attachment(s)
QMdiSubWindow, saveGeometry/restoreGeometry
Hi
I'm having problems when using the saveGeometry/restoreGeometry with QMdiSubWindow.
What happens is that restoreGeometry sets an incorrect horizontal position on my MdiChild window when the main window is on the secondary monitor, the horizontal position equals the width of the primary monitor.
I've attached a project which displays the problem, follow these steps to reproduce:
1. Run the application
2. Move the main window to your secondary monitor
3. Click on File->New child
4. Click on File->Save geometry
5. Close the mdi child window
6. Click on File->Restore geometry
If you try the same steps on your primary monitor it works as expected
Anyone out there who can help me understand this behaviour, is this a bug in Qt or in my code?
I'm using Qt 4.7.2 on Windows7
Thanks in advance
Olle
Re: QMdiSubWindow, saveGeometry/restoreGeometry
I tried your project and the same thing happens on my dual monitor configuration.
It would be interesting to see what happens on linux. Try running a vm linux guest.
Sorry, I can't be of more help.
Re: QMdiSubWindow, saveGeometry/restoreGeometry
Thanks for your reply, I have now tested it on linux (Ubuntu 10.10, Qt 4.7.0) with the same behaviour as on windows...
Re: QMdiSubWindow, saveGeometry/restoreGeometry
I don't know too much about save/restore geometry, perhaps one of the more experienced users here will chime in.
It could very well be a bug - see if something similar has been reported on the Qt BugTracker:
http://bugreports.qt.nokia.com/secure/Dashboard.jspa
Re: QMdiSubWindow, saveGeometry/restoreGeometry
Found it... reported in 2009 and still no fix :(
http://bugreports.qt.nokia.com/browse/QTBUG-1645