How does
lsn.deleteLesson(ui->tableView_lessons->currentIndex())
lsn.deleteLesson(ui->tableView_lessons->currentIndex())
To copy to clipboard, switch view to plain text mode
In your button clicked calling function relate to
{
.....
}
void lessons::deleteLesson(QModelIndex index)
{
QSqlTableModel *model = this->lessonsTable()
.....
}
To copy to clipboard, switch view to plain text mode
You are passing a tableview index in the calling function to who knows what in the deleteLesson slot.
Also have you connected the signal and slot properly?
Bookmarks