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.
我在拆分器中有一个QTreeView和一个PlainTextEdit水平对齐的。两个小部件占用相同的空间,我怎样才能使它比另一个更宽,但仍然能够通过拖动拆分器手柄来重新调整小部件的大小?
QTreeView
PlainTextEdit
您可以为拆分器的列设置拉伸因子。具有较高因子的小部件将比另一个小部件占用更多空间。
http://doc.qt.io/qt-5/qsplitter.html#setStretchFactor。