PDA

View Full Version : set Column Width in QTreeWidget?



vishal.chauhan
25th June 2007, 06:16
Hi All,

I m using QT 4.1.5 on my MAC.

Earlier i was using Qt 4.2.2 and there is a function set ColumnWidth to set the column width of a treeWidget.

But Due to some reason I have to work on Qt 4.1.5 and now I want to set the width of the treeWidget.

I can do that it by resizeColumnToContents but Actually it resize the column t its contents but I want to resize it to the width given by Me.

If anybody knows then plz help me out.

Thanks.

jpn
25th June 2007, 08:12
QTreeView::setColumnWidth() is same than calling QHeaderView::resizeSection(). You can access the header via QTreeView::header().