I am going to assume the top table is a QTableWidget and the lower table is a QTableView that is displaying a separate model of some sort (the picture is not very helpful). When the user triggers the insert you need to:
- Call insertRow() on the model underlying the lower table to insert a 'blank' row.
- Keep a note of the new row number.
- For each column in the top table:
- Get the value in the column from the QTableWidgets model's data() function or through a QTableWidgetItem.
- Create a QModelIndex in the lower model for the new row and column you want to put the value into.
- Call setData() on the lower model to update the cell




Reply With Quote
Bookmarks