Re: Subclass QStandardItem
Did you add instances of your QStandardItem subclass when populating the model?
Cheers,
_
Re: Subclass QStandardItem
Quote:
Originally Posted by
anda_skoa
Did you add instances of your QStandardItem subclass when populating the model?
Cheers,
_
Yes. As explained, it seems to work after I implemented data() and setData() in the subclass of QStandardItemModel. I expected that setting the prototype with "setItemPrototype()" is enough, but it seems it is not and I don't know why.
Re: Subclass QStandardItem
Well, setItemPrototype() would have no affect if you added QStandardItem instances to your model, so I wanted to verify that you hadn't accidentally done that.
I assume you have also checked that the signatures of the overloaded methods match exactly?
Cheers,
_
Re: Subclass QStandardItem
Quote:
Originally Posted by
anda_skoa
Well, setItemPrototype() would have no affect if you added QStandardItem instances to your model, so I wanted to verify that you hadn't accidentally done that.
I assume you have also checked that the signatures of the overloaded methods match exactly?
Cheers,
_
Yes, they match.
Edit: The problem was solved. It seems my project was not recompiled, after clean / build it works as expected. So everything is correct.