Re: Interview reload problem
How do you change the data? do you use QAbstractItemModel::setData() for that? Either way, could we see the code?
Re: Interview reload problem
I just change the sourceData without emitting setData() function.
If I understood the manual correctly, the only thing you have to do when data is changed is emitting dataChanged() for the area of the change. ( http://doc.trolltech.com/4.3/qabstra...l.html#setData ) "Note that the dataChanged() signal must be emitted explicitly when reimplementing this function."
Re: Interview reload problem
Quote:
Originally Posted by
tiptop
If I understood the manual correctly, the only thing you have to do when data is changed is emitting dataChanged() for the area of the change.
Yes, that's correct. But if the data is changed by an outside source, you can do that through setData(). Either way could you show us the method you use for modifying the model?
Re: Interview reload problem
Well, there's nothing to show. I just use the assignment operator change the data. As I implemented my own Model, i cannot use the setData() of a base class because its implementation does nothing but returning false.
It does afaik absolutely not change anything to use a setData function which does exactly the same as two other lines in my own function.
I double checked whether the data is really set and whether the signal is really emitted - it is.
The problem seems to be in the view.
Re: Interview reload problem
Quote:
Originally Posted by
tiptop
I just use the assignment operator change the data.
Hmm... what about the signal emition? Can we see the code?
Quote:
As I implemented my own Model, i cannot use the setData() of a base class because its implementation does nothing but returning false.
I didn't say anything about the base class. I meant you should implement setData() for your model and use it to operate on it.
Quote:
The problem seems to be in the view.
Unless you have subclassed the view and broken something there it should work. Otherwise the problem is within your model.