PDA

View Full Version : making qmainwindow dynamically resizable to fit to screen



Amit_3117
14th October 2009, 10:51
Hi All,

Is there any way by which we can make the qmainwindow dynamically resizable in order to fit to screen??
Alongwith window the widgets on the window should also dynamically be resized.

Thanks in advance...

squidge
14th October 2009, 18:35
erm, have you tried using a layout manager such as the horizontal, vertical or grid layouts?

Amit_3117
16th October 2009, 13:25
Yes I had But Its not working ...

high_flyer
16th October 2009, 13:46
In order to fit your top most widget to the screen size you can use QDesktopWidget for the screen size and resize your top widget based on that.
For the widgets inside your widget use layouts.

FinderCheng
16th October 2009, 13:59
What does "fit to screen" means? Could you use QMainWindow's showMaximized function? It can show main window maximum.