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.
QTreeWidget の列の幅を固定サイズに設定する必要があります。setColumnWidth() は効果がないように見え、ここに示すコードはコンパイラ エラー " 'headerView': is not a member of 'QTreeWidget' " になります。
Qt 4.7.4 を使用しています。
QHeaderView::resizeSection() がうまくいくかもしれません。次のコードを実行してみてください。
treeWidget->header()->resizeSection(index, width);