문제

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?

도움이 되었습니까?
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top