QTableView disable updating when user is editing the datas
-
Hi all,
I have a QAbstractTableModel subclass containing a timer, so it send the update signal every second.
The problem is that, if I use more than 1 second to write, tableView updates itself while I'm editing, deleting what I wrote.
So how can I stop the update signal when I'm editing the view? -
kshegunov Moderatorsreplied to Nosba on 8 Aug 2016, 05:22 last edited by kshegunov 8 Aug 2016, 05:24
@Nosba
Hello,
You can use QObject::blockSignals or the utility wrapper class QSignalBlocker.Kind regards.
-
Thanks a lot for your answer.
I've already seen it, but how can I know when the user is editing a cell? is there some signal emited like startEditing(), end endEditing() ?
I cannot find it in documentation
-
@Nosba said:
but how can I know when the user is editing a cell?
I don't know, and that wasn't your original question. One thing you could try is to subclass the view and reimplement the edit() method from where you can emit a signal that notifies you when editing has started. I hope that helps.
Kind regards.
1/4