How to make cells blinking in a QTableView
I am trying to 'blink' a cell in a QTableView each time the content changes. By blinking I means the background color is set to a particular color then after a short time, returns to the original color.
I thinking about a way by QItemDelegate, but do no figure out how to 'resent' an event to the delegate object to set the background back to original color without 'stimulation' of the model. May be by a timer ?!
Thanks for all your comments, I am stuck...
You could do it in the model you have.
Yust create a timer (singleSAhot would be enough) and emit the dataChanged() signal from the model. By switching a value that indicates the color you've got it.
The delegate does not work here, as it is used for painting but does not trigger it.
so, in pseudo code, it would be:
m_blinkCell = XXX;
if(index.cell == m_blinkCell && role==background)
m_blinkCell = none;
Impressive Gerolf... I am trying your idea now
If you have any further questions, just ask. It was a short shot, but it will work :-)