[Qt-interest] QTreeView expand delay
Malyushytsky, Alex
alex at wai.com
Mon Feb 2 23:00:58 CET 2009
I am not sure about the best place, but I expect you might not need it.
You probably can just disable QTreeView update, change model, set nodes expanded, do other changes then enable QTreeview update. A result will be fastest posible, single visual change on the screen.
setUpdatesEnabled(false);
bigVisualChanges();
setUpdatesEnabled(true);
Alex
________________________________
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Deepak Chandran
Sent: Saturday, January 31, 2009 9:57 PM
To: Qt Interest
Subject: [Qt-interest] QTreeView expand delay
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)?
Thanks.
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090202/afc582ac/attachment.html
More information about the Qt-interest-old
mailing list