PDA

View Full Version : how to get geometry of QMainWindow without menubar and toolbars?



EnErGy[CSDX]
20th August 2008, 18:44
How to get rect of central rect plus dockwidets?
I mean i want to know size of mainwidget without toolbars and menubar.

spirit
20th August 2008, 19:01
QRect size = centralWidget()->geometry();

?

jpn
20th August 2008, 19:15
Just curious, what do you want this information for? ;)

EnErGy[CSDX]
20th August 2008, 19:54
QRect size = centralWidget()->geometry();

?

and what if QDockWidget is docked?

http://doc.trolltech.com/4.4/images/mainwindowlayout.png

i what to know geometry of light blue area.

EnErGy[CSDX]
20th August 2008, 19:55
Just curious, what do you want this information for? ;)

to place widget that cover central widget and dock widgets.

wysota
20th August 2008, 20:05
;79031']to place widget that cover central widget and dock widgets.

Ok, but why?

Nevertheless it might be easier to calculate the area by substracting the part taken by the menu, toolbars and statusbar from the whole widget.

EnErGy[CSDX]
20th August 2008, 20:21
Ok, but why?

Nevertheless it might be easier to calculate the area by substracting the part taken by the menu, toolbars and statusbar from the whole widget.
this is not easy solution, but looks like it is only one posible.