PDA

View Full Version : emitDataChanged and dataChanged signal



fruzzo
26th September 2012, 14:33
I'm trying to do something like this: I'm using a QStandardItemModel and populate it with a custom subclass of QStandardItem : MyStandardItem.

I rimplemented the setData calling emitDataChanged() because I don't call the base implementation of setData() (such as exaplained in qt documentation).
Unfortunately emitDataChanged() didn't seem to trigger my model's dataChanged() signal. Why? Are there other somethings to know when using emitDataChanged?

d_stranz
26th September 2012, 15:47
How do you know that your model's dataChanged() signal is not triggered? Have you used the debugger to follow your setData() code into the emitDataChanged() call to see what happens? Or are you simply assuming that because your slot isn't being called, nothing that precedes it is working?