QTableView + QStyledItemDelegate + QPushButton editor + openPersistentEditor problem
- Create a QTableView.
- Subclass QStyledItemDelegate and output a QPushButton in its createEditor member function.
- Reimplement the setModelData function and put a qDebug() statement to see how the delegate manages the button clicks and the model modification.
- Create an instance of the delegate and set it to the view.
- Open persistent editor in one of the cells.
When the button is hit, the setModelData reimplemented member function does not get called immediately after the click of the button, but if one clicks outside all table cells - in the empty part of the table area, then it is called and the model is notified.
Suggestions what should be done to fix this lazy notification effect?