Hi Jun,

update(QModelIndex) is a slot in QAbstractItemView (and which is the
superclass of QTreeView); QAbstractItemModel doesn't have any update()
method at all.

What you can do (as far as I know about your code) is to emit a
rowsAboutToBeInserted() before adding the data to your model and
rowsInserted() after the data is added to your model. The view
connected to your model will show your data automatically.

On 7 February 2012 11:23, Jun Koi <junkoi2...@gmail.com> wrote:
> On Tue, Feb 7, 2012 at 7:08 PM, Daniele Esposti <e...@expobrain.net> wrote:
>> 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.
>
> this means i need to call update() method of the model, right?
>
> how about the update() method of the TreeView widget? do i need to call it?
>
> thanks a lot,
> Jun



-- 
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