PDA

View Full Version : Adding rows to Tableview



codeman
1st October 2009, 10:12
Hello friends,

how can I add a row to a QTableview which is connected to a QSqlTabelmodel.

That means that I want to right click the Tableview, a contextmenu is open and I choose for example <add row> after filling fields I submit (on manual submit).

What are the steps to the target....

wysota
2nd October 2009, 10:27
Implement the context menu, assign an action to it, connect it to a slot where you will open a dialog to fill in the data, then call insertRecord() on the model and submit.