[PyKDE] [PyQt]: how to refresh a QTreeView widget?
apaku at gmx.de
Fri Sep 8 15:00:26 BST 2006
On 08.09.06 15:23:50, Oscar Cossu wrote:
> def removeRows(self,arow,count,parent):
> for ii in range(count):
> ##code for removing a row from QDomDocument here
> return True
> This is my model class. When i remove a row the qtreeview repaint the tree
> but the row deleted isn't the one i've selected.
> pick elements2 for removing.
> treeview update after removing but show:
> Now, if i do:
> print qtreeview.model().domDocument.toString()
> the result is:
Your removeRows looks ok. I guess you're either telling the treeview (by
false row number) that it should remove the last row, or your data
method doesn't fetch the proper row from the document.
As you use QDomDocument, your complete model is probably not that large,
can you post a complete example, or at least the complete model
You'll feel devilish tonight. Toss dynamite caps under a flamenco dancer's
More information about the PyQt