PDA

View Full Version : Default menu sizes



KingOfHeart
12th May 2011, 23:40
I have three menus(sprites, entities, fills). These menus can be moved around and stretched out.
Currently the menu on the left and menu on the right are so big that they make the middle menu too skinny by default(I moved the borders in the pic). I know how to set the min and max but not defaults.
Any idea on how to give these three menu default widths?

JoZCaVaLLo
13th May 2011, 09:48
Looks like your menu's size is related to the window width (which my depend on the screen size)... I would calculate the default menu width at YourMainWindow::resizeEvent ( QResizeEvent * event )

KingOfHeart
15th May 2011, 07:01
Not used to using QT functions, can anyone give an example on how to use it?
Here's some of the code.



sceneBackgrounds->setSceneRect(0,0,800,600);
sceneEntities->setSceneRect(0,0,800,600);
sceneFills->setSceneRect(0,0,800,600);

addDockWidget(Qt::RightDockWidgetArea, dockProperties);
addDockWidget(Qt::BottomDockWidgetArea, dockSpritesBackground);
addDockWidget(Qt::BottomDockWidgetArea, dockSpritesEntity);
addDockWidget(Qt::BottomDockWidgetArea, dockSpritesFill);

dockSpritesBackground->setWidget(gviewBackgrounds);
dockSpritesEntity->setWidget(gviewEntities);
dockSpritesFill->setWidget(gviewFills);

dockSpritesBackground->setMinimumHeight(200);
dockSpritesEntity->setMinimumHeight(200);
dockSpritesFill->setMinimumHeight(200);
YourMainWindow::resizeEvent ( QResizeEvent * dockSpritesBackground); //< I know this is wrong

How to change it?

KingOfHeart
17th May 2011, 20:52
Need more info?

Santosh Reddy
17th May 2011, 21:46
Can you post the default screenshot, witout adjusting the size?

KingOfHeart
18th May 2011, 00:10
see how squished entities menu is?
I'd actually settle for even, but really want sprites and entities to be the same, and fills to be the smallest for default.
Haven't worked too much with c++ or QT so not 100% sure on how to use certain functions.

I'm helping someone do some basic tweaking here and there.

edit: added the attachment I forgot