Important: Please read the Qt Code of Conduct -

How to add a new row with a QTableView and a QDataWidgetMapper?

  • Hello,

    first, i apologize for my bad English.

    I'm trying to create an application with a QMainWindow and a QDialog. The first one will have a QTableView, and the second one will have a group of QLineEdit's associated with a QDataWidgetMapper.

    I've read the post that uses a QIdentityProxyModel, but i get some oddities.

    After adding a new record (using a button), how can i restore the original index?

    If someone selects the fake row, how can i avoid updating the index?

    How can i use a QIdentityProxyModel to add new records?

    Can someone help me?

    Thanks a lot,

Log in to reply