Hi,
So suppose I have a QTableWidget with many cells. Consider a particular cell with value say “String1”.
Now the user double clicks & edits the value to say “String2”.
What I want is that QTableWidget should emit a SIGNAL when the user has successfully edited the cell & pass the previous value i.e. “String1” to the connected SLOT. Now let me add that I do not want the SIGNAL to be emitted if the cell is merely selected or double clicked, but only when it is edited.
You may ask why I want this. This is because I am checking the new value “String2” for some conditions; if it is OK then I let “String2” remain in the cell, but if it does not satisfy my conditions then I want the cell to have “String1” instead.
I have used QTableWidget a little too much in my whole program, so it might not be possible to use Model/View framework now.
Any suggestion is welcome.
Thanks!
↧