[Interest] QListView and collapsing nodes

Andreas Pakulat apaku at gmx.de
Tue May 8 17:19:33 CEST 2012


On Tue, May 8, 2012 at 5:03 PM, Jason Dictos <jdictos at barracuda.com> wrote:

> So I have this QTreeView class, which I populate the underlying model with
> things at various times. I am struggling with an issue though that whenever
> I update a particular QModelIndex, that level of nodes is collapsed by the
> view. ****
>
> ** **
>
> The net effect is whenever a user refreshes an expanded node, that node is
> collapsed.
>

The view usually only does that if its notified that the layout of the
expanded index changed, in particular rows/columns have been added/removed
to it or if your model emits the layoutChanged signal for it. So check
that, if you can't spot any error provide a simple self-contained example
which simply does the changes your real model does triggered by a timer or
so.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120508/d0d975d9/attachment.html>


More information about the Interest mailing list