PDA

View Full Version : resizing a renderwindow



fi0r
21st June 2010, 10:55
Hi,

Im having a Main Window holding a ogrewidget (Ogre RenderWindow) in the central widget. Id like to have the ogrewidget fullscreen. I ve tried the global size() method and the one of the central Widget. But Im not getting the correct size. I cant set the ogreWidget as central Widget because i had to overwrite the paint method, which means i cant show other widgets except dockwidgets.

QSize windowSize = ui.centralWidget->size();
//windowSize = size();
ogreWidget->resize(windowSize.height(),windowSize.width())

Is there any other way to get the correct size of the application? Btw the application is fullscreen anyways, maybe there is another easy solution.

SneakyPeterson
21st June 2010, 13:59
I think that resize should work correctly. Perhaps you are experiencing troubles because your width and height are switched.

SneakyPeterson
22nd June 2010, 08:24
Errrmmm....to be more specific:
ogreWidget->resize(windowSize.width(),windowSize.height())