Qt-interest Archive, May 2008
table view does not reflect change
Message 1 in thread
Hi all
I use QTableView to display a customized model which inherits
QAbstractTableModel.
My problem is the view does not reflect the change I make to the model,
even though the underlying model data is successfully changed. I do call
dataChanged
explicitly in setData.
What could be the problem?
thanks
Yifei
--
[ signature omitted ]
Message 2 in thread
You might find the problem by running this on your model:
http://labs.trolltech.com/page/Projects/Itemview/Modeltest
did you read the hints here?
http://doc.trolltech.com/4.3/qabstracttablemodel.html#details
if you're inserting and removing, calling dataChanged() is not enough.
Cheers,
Peter
Yifei wrote:
> I use QTableView to display a customized model which inherits
> QAbstractTableModel.
>
> My problem is the view does not reflect the change I make to
> the model,
> even though the underlying model data is successfully
> changed. I do call
> dataChanged
> explicitly in setData.
--
[ signature omitted ]