Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 QHBoxLayout,它上面有 2 个 QVBoxLayout,一个挨一个。每个布局都有小部件,我想知道如何使此布局可调整大小(用户可以更改宽度)?
使用QSplitter。为您的 vbox 布局创建几个顶级容器小部件,然后使用拆分器的addWidget方法将小部件添加到拆分器。默认情况下拆分器的方向是水平的,因此 vbox 将并排显示。