PDA

View Full Version : Restore the size of the window after minimize



SkripT
23rd March 2006, 16:22
Hi, I want to know how to restore the size (and position) of a window after been minimized. I have tried it with showNormal but it reduzes the size of the window if the window was at full screen before minimize it. Anybody knows it?

Thanks.

wysota
23rd March 2006, 16:25
Doesn't show() do what you want?

SkripT
23rd March 2006, 17:17
Doesn't show() do what you want?

Sorry wysota, I thought that show() only was useful when the window is explicitly hidden, not minimized...

high_flyer
23rd March 2006, 20:08
if you want to restore a window you should use showNormal().

wysota
23rd March 2006, 20:44
What about raise() or activateWindow()?

high_flyer
23rd March 2006, 20:57
Ahh sorry, I see now you tried with showNormal()...
I use showNormal on a dialog which I took off its title bar and handled all that my self.
For me showNormal behaves just like it would with a normal window, meaning, if I maximize the dialog, then minimize it and then resotre it, it will come back to be maximized.
Check if you are not calling showNormal twise after minimized state, this could have the effect your are experiancing, meaning, once it restores(to maximized), and the scond call restores it back to the not maximize size...

SkripT
25th March 2006, 10:59
What about raise() or activateWindow()?

I will try it thanks.

SkripT
25th March 2006, 11:02
For me showNormal behaves just like it would with a normal window, meaning, if I maximize the dialog, then minimize it and then resotre it, it will come back to be maximized.
When you talk about "restore" it what you mean, calling "showNormal"? I thought that showNormal has this behaviour but doesn't seems so in my app...


check if you are not calling showNormal twise after minimized state, this could have the effect your are experiancing, meaning, once it restores(to maximized), and the scond call restores it back to the not maximize size...

I will check it thanks

montuno
20th November 2009, 10:27
Hi all
Please apologize for re-activating this thread, but I'm unable to find a proper solution. Is it possible to show a widget maximized/minimized depending on his previous state? I thought, showNormal() will do the job but in my sample the widget pops up with a bit of flickering... and then it will be showed in normal state.

..thanks!

sami1592
22nd September 2016, 05:25
I am facing the same problem, to clarify further it is as follows
- my window in maximized to full screen by me
- I minimized it
- now from code, if I call showNormal() it restores it but it does not stay full screen anymore which is the desired behavior.

wysota
22nd September 2016, 16:23
showNormal() shows the window as a normal (i.e. not full screen) window. Try calling show() or showFullScreen().