[Interest] QTreeView and collapsing nodes
jdictos at barracuda.com
Tue May 8 17:31:44 CEST 2012
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?
From: Andreas Pakulat [mailto:apaku at gmx.de]
Sent: Tuesday, May 08, 2012 11:20 AM
To: Jason Dictos
Cc: interest at qt-project.org
Subject: Re: [Interest] QListView and collapsing nodes
On Tue, May 8, 2012 at 5:03 PM, Jason Dictos <jdictos at barracuda.com<mailto: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.
'Like' us on Facebook for exclusive content and other resources on all Barracuda Networks solutions.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest