[PyQt] treeview model/view or item-based?

Ulrich ulrich.mierendorff at gmx.net
Mon May 5 22:02:49 BST 2008


That looks like a good idea and should be easy to implement.
Regards,
Ulrich
Doug Bell wrote:
>
> You don't actually have to create all items at once with the tree-widget
> item-based approach.  You can just create the visible items (that have
> open parents).  Then create a method that loads children on demand and
> connect it to the itemExpanded(QTreeWidgetItem*) signal.
>
> To get the "+" button to display properly, you can add a single dummy
> child item to each closed parent item, then delete it when actually
> loading the real children.
>
> Doug.
>
>   



More information about the PyQt mailing list