View Full Version : How can I save the windows I have previously opened ?

Marwa Shams
25th September 2011, 10:43
How can I save the windows I have previously opened so when I Press a button "back" I can show the exact prev. window with its contents .
For example:-
I can open a new window by button clicking on the current window and so on ..
and when I close the existing window I find the prev one but I can't navigate between it's controls by keyboard "case of non-touch mobiles"
It appears as not working.
So I want to press a button "back" that closes the existing window and retrieves the previously opened one without these problems.

25th September 2011, 11:29
You can save the full state (position, size etc) of a QMainWindow with the saveState() method. When you reopen the window, you call restoreState(). Read the documentation for these two methods, they are easy to use.

25th September 2011, 12:29
sounds like you are using a wizard? QWizard?

Marwa Shams
25th September 2011, 12:38
no I create the back button myself
and inside click event i close the current form
so the prev appears.

25th September 2011, 20:28
yes, have you looked at QWizard? It does what you need...