Results 1 to 5 of 5

Thread: QMdiSubWindow, saveGeometry/restoreGeometry

  1. #1
    Join Date
    Apr 2010
    Posts
    3
    Platforms
    Unix/X11 Windows

    Default 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
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default 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.

  3. #3
    Join Date
    Apr 2010
    Posts
    3
    Platforms
    Unix/X11 Windows

    Default 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...

  4. #4
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default 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

  5. #5
    Join Date
    Apr 2010
    Posts
    3
    Platforms
    Unix/X11 Windows

    Default Re: QMdiSubWindow, saveGeometry/restoreGeometry

    Found it... reported in 2009 and still no fix
    http://bugreports.qt.nokia.com/browse/QTBUG-1645

Similar Threads

  1. Replies: 6
    Last Post: 9th May 2012, 10:53
  2. QMdiSubWindow Questions
    By ericV in forum Qt Programming
    Replies: 2
    Last Post: 1st October 2009, 14:52
  3. Moving a QMdiSubWindow
    By philwinder in forum Qt Programming
    Replies: 1
    Last Post: 2nd November 2008, 10:12
  4. saveGeometry in X11
    By arjunasd in forum Qt Programming
    Replies: 16
    Last Post: 7th August 2007, 23:56
  5. QMdiSubWindow resizing in 4.3
    By kalpa in forum Qt Programming
    Replies: 0
    Last Post: 4th June 2007, 13:39

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.