PDA

View Full Version : QTreeWidget scroll only one column



nina1983
11th August 2008, 16:53
Dear all,

I'm wandering if there's a way to set a scroll bar only for a column of a QTreeWidget.
Actually I have a QTreeWidget with two columns I would like to set (if necessary) a scroll bar only for the first column.

Thank a lot

=)

Annalisa

maverick_pol
11th August 2008, 17:22
Hi,

What about implementing custom "middle/center" button behavior and update your treeWidget the way you want it ?

Does this idea help you?

Kacper

nina1983
12th August 2008, 09:11
Thanks for you replay!

I think I don't understand clearly what you mean...
I have to add a button to my interface? What do you mean with "custom middle button behavoir"

...Sorry but it's my first time with Qt and I'm getting mad!

Thanks a lot

Annalisa

jpn
13th August 2008, 15:07
The easiest way to do it is to construct two separate QTreeWidgets and put them right next to each other. Make one scrollable and the another not.