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.
スプリッターにaQTreeViewと a をPlainTextEdit水平に配置しました。どちらのウィジェットも同じ量のスペースを占有しますが、一方が他方よりも広くなるようにするにはどうすればよいですか?スプリッターハンドルをドラッグしてウィジェットのサイズを変更することはできますか?
QTreeView
PlainTextEdit
スプリッターの列にストレッチ係数を設定できます。より高い係数を持つウィジェットは、他のウィジェットよりも多くのスペースを占有します。
http://doc.qt.io/qt-5/qsplitter.html#setStretchFactor。