質問

I have a Qt Widget which has a frame, containg the rest of the widgets.

I only want one of the widgets to expand on maximazing the window, so I've set a max value for the others.

But it will only expand if I set a grid layout to the frame, which messes up the place of the widgets.

How can I solve it?

役に立ちましたか?

解決

Do you use any kind of layout ? Size policy only works if the parent has a layout set.

You can use a combination of different layouts to obtain the desired look, otherwise you will have to calculate the size of the 'expanding widget' yourself in the resize event method of the parent.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top