PDA

View Full Version : How to ensure qtablewidget gets updated before the button clicked



qt_harder
13th October 2016, 10:56
I have a dialog box that has 2 widgets, one is tablewidget and the other is a button.
When an item in the tablewidget is in edit (the item has input focus), the user may click the button directly.
So 2 signals will be triggered: tableWidget_cellChanged and button_clicked.

12172

In the slot function to button_clicked, the updated cell in tablewidget is processed, but
the button_clicked signal always arrive before the tableWidget_cellChanged,
so the slot function to button_clicked always gets an invalid item text.

How to ensure the tableWidget_cellChanged is called before the button_clicked?