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

前端 未结 4 988
长情又很酷
长情又很酷 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:47

    My suggestion is to implement a model, which would help you make a clean separation between the data, and the UI editing the data. Your model would then get notified that a given model index (row and column) changed to the new data, and you could change whatever other data you needed to at that point.

提交回复
热议问题