On 02/07/2012 05:24 AM, Jun Koi 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?
I think you might fix this by emitting one of the row change signals
from your model. For example, rowsInserted --
http://developer.qt.nokia.com/doc/qt-4.8/qabstractitemmodel.html#rowsInserted
.
Joel
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside