[Qt-interest] QTreeView expand delay

Sean Harmer sean.harmer at maps-technology.com
Sun Feb 1 13:12:30 CET 2009


Hi,

On Sunday 01 February 2009 05:57:27 Deepak Chandran wrote:
> In my application, I use a tree view to summarize a model. The model can
> change due to various things, so I generate a new model every time there is
> a change. When I assign the new model to the tree view, I make store the
> original nodes that were expanded and try to reproduce the same structure
> after updating the model. However, the expand has no effect when it is done
> immediately after the model update. I read in a previous post that there is
> a delay between updating the model and being able to expand/collapse
> nodes.So, if I want to constantly update the model and adjust which nodes
> are expanded at the same time, where would be the best place to do this
> (i.e. which signal/slot)?
Is there any reason why you have to create a new model at every update? It 
would be much easier if you simply updated the existing model's data.

Sean



More information about the Qt-interest-old mailing list