Can we set different alignments for widgets in QLayout?

654 views Asked by At

I have many widgets in a horizontal layout. I have set alignment to vertical center and hence all the widgets are proportionately placed and the content margins are set to (0, 0, 0, 0).

I want to add one more widget which is aligned to the top and not the center.

Is there a way to add widgets with different alignment in the same layout?

One solution: To add this last widget to a vertical layout and align it to top and add that vertical layout to the horizontal layout. But this adds one more layout which i am thinking can be avoided.

0

There are 0 answers