Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Query regarding QSqlTableModel and delegate
sunilpkd last edited by
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.
What are you doing within your delegate ?
By the way, you should rather use QStyledItemDelegate.