Good info, however I've confirmed that I'm not explicitly emitting that 
layoutChanged signal when refreshing the nodes.

I am adding rows, or removing rows for sure however, hence the refresh.

So, is it just impossible to add items to an expanded tree's node, without it 
collapsing then?

-Jason

From: Andreas Pakulat [mailto:ap...@gmx.de]
Sent: Tuesday, May 08, 2012 11:20 AM
To: Jason Dictos
Cc: interest@qt-project.org
Subject: Re: [Interest] QListView and collapsing nodes


On Tue, May 8, 2012 at 5:03 PM, Jason Dictos 
<jdic...@barracuda.com<mailto:jdic...@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

'Like' us on Facebook for exclusive content and other resources on all 
Barracuda Networks solutions.
Visit http://barracudanetworks.com/facebook


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to