Get previous value of QComboBox, which is in a QTableWidget, when the value is changed

前端 未结 4 991
长情又很酷
长情又很酷 2021-02-09 16:55

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

4条回答
  •  情书的邮戳
    2021-02-09 17:37

    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

提交回复
热议问题