PDA

View Full Version : Collapsable sections in ListView



Axtroz
7th April 2015, 14:01
Hello,
I've been reading the docs and I'm pretty sure that the answer is 'No', but a confirmation never hurt anybody :)
Is it possible to expand/collapse sessions in a ListView in QtQuick 2.0?
I have a nested list inside my delegate to achieve the result but I thought that if a single list can do the trick, I should save the overhead of having another one.

Thanks!

anda_skoa
7th April 2015, 14:19
I don't think there is out of the box functionality for that.

Aside from your solution, you could also do it with the help of the model, e.g. having a "collapsed" property or similar on each item use it to determine if the normal item delegate has height 0 or not.

Cheers,
_