开发者

When does QVBoxLayout recalculate the layout?

开发者 https://www.devze.com 2023-01-29 18:18 出处:网络
I have a window with a a QVBoxLayout in it. The layout has some child widgets (defined in a .ui file). In my window class\' constructor, I create and assign a menu to the layout. The position of the w

I have a window with a a QVBoxLayout in it. The layout has some child widgets (defined in a .ui file). In my window class' constructor, I create and assign a menu to the layout. The position of the widgets is supposed to shift down, since the menu takes some vertical space. This does not occur immediately - if I query the top child widget's Y coordinate right after the setMenuBar() call, it's still zero.

Question - when does the layout recalculate the positions of its children? Can I force it to开发者_运维百科?


Perhaps this: http://doc.qt.nokia.com/stable/qlayout.html#activate

0

精彩评论

暂无评论...
验证码 换一张
取 消