Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top