QTableView how to do something on start/end editing
Are there any signals (I cannot find anything in the docs) emitted when tha
user starts and ends the QTableView widget cell editation?
I want to execute some function from table model then user begins edit eny cell and execute another function when user ends editing. How can i do this?
Re: QTableView how to do something on start/end editing
If you have own data model then
On start editing QAbstractItemModel::data is called with role Qt::EditRole.
On finish editing QAbstractItemModel::setData is called. See subclasing section in QAbstractTableModel and QAbstractItemModel.
Re: QTableView how to do something on start/end editing
I put qDebug() but there is no output in console and my timer does not stop.
Code:
{
if (role == Qt::DisplayRole) {
return m_Data.getCell(index.row(), index.column());
}
if (role == Qt::SizeHintRole) {
}
if (role == Qt::EditRole) {
//timer->stop();
qDebug() << "timer stop";
return m_Data.getCell(index.row(), index.column());
}
}