[PyKDE] MVC Question

Andreas Pakulat apaku at gmx.de
Fri Oct 6 16:56:07 BST 2006


On 06.10.06 08:30:27, M.Chambers wrote:
> Hi everyone, thanks for your past advice.  I have a abstract model and a
> qtreeview setup to use an cElementTree object as the underlying data
> source.  Works awesome, and its very fast.  What happens when I want to
> replace the elelentreee object with a newer one which may or may not
> contain new data?  For a split second I would be ripping the data out
> from under the model.  Is there any methods I have to call to prepare it
> for this?

Put a method into your model class that takes the new tree assigns it to
it's member variable and then emit the modelReset signal from that
function. This will signal the tree view that the model has totally
changed.

Andreas

-- 
Green light in A.M. for new projects.  Red light in P.M. for traffic tickets.




More information about the PyQt mailing list