QTableView + QStyledItemDelegate + QPushButton editor + openPersistentEditor problem



    1. Create a QTableView.
    2. Subclass QStyledItemDelegate and output a QPushButton in its createEditor member function.
    3. Reimplement the setModelData function and put a qDebug() statement to see how the delegate manages the button clicks and the model modification.
    4. Create an instance of the delegate and set it to the view.
    5. 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?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.