PDA

View Full Version : QTreeWidget Expand/Collapse Button Size



Slewman
22nd February 2010, 15:47
Is there a way to increase the "Expand/Collapse (+/-)" button size in the QTreeWidget. I am assuming it is a style sheet issue but i have looked through the style sheet help and couldnt find anything.

I am trying to use the treewidget on a touch screen and it is proving to be difficult to expand/collapse the tree's items because the expand/collapse buttons are too small.

Slewman
28th June 2010, 23:01
Im reposing the question...

is there a way to increase the size of the expand/collapse buttons in a QTreeWidget?

Using a touch screen with the QTreeWidget is almost impossible with the default size of the buttons

mkfnx
27th July 2010, 20:47
Maybe the QApplication::globalStrut (http://doc.trolltech.com/4.6/qapplication.html#globalStrut-prop) property could be useful.

But if it isn't mandatory to expand/collpase using the +/- buttons, maybe you can rewrite the click event of the QTreeWidget to do this.

Hope it helps!

aamer4yu
28th July 2010, 12:07
You will need to use a delegate.
Then in delegate one - you will need to return size hint for the item
and second - override the drawDecoration function, and draw a bigger +/- yourself.