Results 1 to 3 of 3

Thread: Any signal emitting while window is restored/maximized other than using changeEvent()

  1. #1
    Join Date
    Aug 2012
    Posts
    4
    Qt products
    Platforms
    Windows

    Default Any signal emitting while window is restored/maximized other than using changeEvent()

    In my Qt application, there is a QDockwidget (on left) and a central widget. My need is: User clicks on window's maximize button and stretches QDockwidget's width (by mouse) and then clicks on restore button. And then user clicks on window's maximize button again, at this the earlier QDockwidget's width setting (when window was maximised) should remain. Currently in my application it doesn't.

    So for this I am making use of saveState() and restoreState(). Have now added changeEvent(), inside it, if window state changed and window is restored then calling saveState() and when window is maximised then calling restoreState(). But the problem seem to me that saveState() saves the current state that is after window is restored and not before. I want to save the state that user did (stretched QDockwidget) while window was maximised (just before restore button is clicked).

    Or is there any way/signals emitting while window is minimized/restored/maximized other than using changeEvent().

    Any help or suggestion is appreciated. Thanks.

  2. #2
    Join Date
    Aug 2012
    Posts
    4
    Qt products
    Platforms
    Windows

    Default Re: Any signal emitting while window is restored/maximized other than using changeEve

    Found out. My mistake..

    When restore down button clicked then saveState() was saving the state that was while window was maximised (just before restore button is clicked). The problem was with my resizeEvent().

  3. #3
    Join Date
    Aug 2012
    Posts
    1
    Qt products
    Qt3
    Platforms
    MacOS X

Similar Threads

  1. Why a restored window doesn't keep it's state (sizes)?
    By evgeniy in forum Qt Programming
    Replies: 0
    Last Post: 3rd December 2011, 07:47
  2. Resizing a maximized, custom-frame window
    By Claymore in forum Qt Programming
    Replies: 9
    Last Post: 24th November 2010, 18:17
  3. problem: Window moves on click when maximized
    By Toshikazu in forum Qt Programming
    Replies: 3
    Last Post: 30th January 2010, 22:22
  4. Emitting signal from DLL to EXE
    By Miihkali in forum Qt Programming
    Replies: 6
    Last Post: 27th March 2009, 08:32
  5. Frustrated trying to get maximized window.
    By Doug Broadwell in forum Qt Programming
    Replies: 4
    Last Post: 6th February 2009, 06:06

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
  •  
Qt is a trademark of The Qt Company.