user2027896
user2027896

Reputation: 63

QT Layouts, how to make widgets in horizontal layout move down a row instead of overflowing the window

Right now I have a QHBoxLayout :

| W  W  W  W  W  W |

I resize smaller I get:

| W  W  W  W |
<------------>

I want (underlines are black space):

| W  W  W  W |
| W  W _ _ _ |

I am not sure which layout would do this. Anyone have any ideas?

The KDE Settings application does what I am looking for. I downloaded the code and have started searching but haven't found what I want yet.

Upvotes: 6

Views: 2970

Answers (1)

york.beta
york.beta

Reputation: 1827

See Flow Layout Example and this question.

Upvotes: 7

Related Questions