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

為{幸葍}努か 提交于 2020-01-04 01:09:10

问题


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.


回答1:


See Flow Layout Example and this question.



来源:https://stackoverflow.com/questions/14619047/qt-layouts-how-to-make-widgets-in-horizontal-layout-move-down-a-row-instead-of

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!