[PyQt] refreshing QTreeView

Hans Meine meine at informatik.uni-hamburg.de
Fri Nov 19 13:26:52 GMT 2010


Op den Dunnersdag 18 November 2010 Klock 20:24:09 hett James Polk schreven:
> Anyways,..I think this is working....
> But after adding a new record via addMail(), I can't seem to get
> self.proxyModel to refresh itself..

Each model must emit the right SIGNALs to let views know about needed updates.  
A proxy model will simply proxy these signals, too.

In your case, I would expect QStandardItemModel to do all that for you if you 
use it properly.  I expect your addMail to call insertRow() / appendRow(), 
which should just work?!

HTH,
  Hans


More information about the PyQt mailing list