Pergunta

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?

Foi útil?
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top