PDA

View Full Version : Scrollbar in QTreeWidget



sabeesh
23rd August 2007, 08:30
Hi,
I am using QT4.3.0. I have a QTreeWidget in my program and it contain one column. I add amother QTableWidget in my program and i add a QSplitter in my program between these two widget. In my program I create a tree. and it is working. My problem is that, when i expend the tree, then the vertical scrollbar not display, but the horizontal scrollbar is display. I set these two properties as "ScrollBarAsNeeded".
Please help me...

marcel
23rd August 2007, 08:38
If the contents of the widget are too big to display then it will show the vertical scroll bar. There is no doubt about that.

You must have been doing something wrong.
Can you post some code, including the part where you layout the widgets? Maybe the UI too?

Regards

jpn
23rd August 2007, 09:35
Try:


treeWidget->header()->setStretchLastSection(false);
treeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);

sabeesh
23rd August 2007, 09:48
hi,
Sorry, it is my mistake.
My problem is that, when i expend the tree, then the vertical scrollbar is display, but the horizontal scrollbar is not display. I set these two properties as "ScrollBarAsNeeded".
Please help me...