PDA

View Full Version : How to increase a margin between last tree item and QTreeView bottom baundary



satsee555
8th February 2011, 08:19
Hi,

I'm using a subclass of QTreeView and would like to increase a margin between the last item ( bottom item ) in the tree and the bottom boundary of the QTreeView itself. Please see attached picture for more detail.

Is there any way to achieve this?

wysota
10th February 2011, 00:06
It should be possible by adjusting the range of vertical scrollbar and optionally reimplementing visualRect if you need this behaviour for every last item in each branch. You can also try to toy a bit with the delegate but this will probably ruin your tree branch indicator.