Unsolved Query regarding QSqlTableModel and delegate
I am doing one programme in native Qt. I have created Tableview with model as QSqlTableModel and delegate as a subclass of QItemDelegate. Along with that ,I have created SQLITE database with table assigning to QSqlTableModel. Initially it is displaying the data from the data bse table. Once I edit from the delegate, I have to update the database which is not happening properly.
I have Delegate::setModelData() from here I will be calling model->setdata. If I want to implement the database submit function , where I need to implement the same? In the delegate class or in model class ? Please help me.
SGaist Lifetime Qt Champion last edited by SGaist
What are you doing within your delegate ?
By the way, you should rather use QStyledItemDelegate.