Say I have a QTableWidget
and in each row there is a QComboBox
and a QSpinBox
. Consider that I store their values is a QMap
I was just having a similar issue, but for me i needed the previous index for something very trivial so defining and implementing a whole class for it was unjustified.
So what I did instead was keep an argument called say 'previousIndex' and updated it's value only after I had done everything I needed with it