Hi Jun,

the slot QAbstractItemView.update() wants a QModelIndex as a parameter
http://www.pyside.org/docs/pyside/PySide/QtGui/QAbstractItemView.html#PySide.QtGui.PySide.QtGui.QAbstractItemView.update

This means you need to pass the QModelIndex of the data you added to the model.

On 7 February 2012 10:24, Jun Koi <junkoi2...@gmail.com> wrote:
> hi,
>
> i am creating a treeview (QTreeView), and i set a model
> (QAbstractItemModel) for it (using setModel() method).
>
> now i update the model (with new data), and call treeview.update()
> with the hope that my treeview will be redrawn to reflect the new
> data.
>
> however, that doesnt update the view. i looked closer, and confirm
> that even after treeview.update() is called, the rowCount() method of
> the model is not executed at all. which means the update() doesnt do
> anything with the new model data.
>
> i must missed something. anybody please tell me how to fix this problem?
>
> thanks,
> Jun
> _______________________________________________
> PySide mailing list
> PySide@lists.pyside.org
> http://lists.pyside.org/listinfo/pyside



-- 
Daniele Esposti

My Blog http://www.expobrain.net
LinkedIn http://www.linkedin.com/in/danieleesposti
Twitter http://www.twitter.com/#!/expobrain
_______________________________________________
PySide mailing list
PySide@lists.pyside.org
http://lists.pyside.org/listinfo/pyside

Reply via email to