Reputation: 33813
How to extend the object(QPushButton
) which colored in brown.
Frankly, I have tried to do that by add Horizontal layout
but was does not appears fine.
As in the picture, I want to extend(the width only) the size of a specific QPushButton without the others when the widget be maximized.
Upvotes: 0
Views: 137
Reputation: 13698
You need all these buttons to be inside the horizontal layout. Then you need to play with QSizePolicy
. For your example you shuold leave the first 3 buttons with QSizePolicy::Fixed
and set QSizePolicy::Expanding
to the 4th one.
P.S. Layout should get all the horizontal space your window has. It should not be of a fixed size.
Upvotes: 1