[argento] backport to Qt 5.9 LTS

This commit is contained in:
giomba 2019-08-16 20:51:52 +02:00
parent 6f4f1d67ca
commit 69e2b8c6a1
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ void MainWindow::on_buttonNuovo_clicked() {
void MainWindow::on_tableSoci_clicked(const QModelIndex& index) {
if (index.isValid()) {
/* extracts id socio from first column of table view */
int id = index.model()->data(index.siblingAtColumn(0)).toInt();
int id = index.model()->data(index.sibling(index.row(), 0)).toInt();
if (id != 0) { /* if click is not on other fields than id... */
EditWindow* w = new EditWindow(id, this);
w->setAttribute(Qt::WA_DeleteOnClose); /* delete window at the end */
@ -78,4 +78,4 @@ void MainWindow::on_tableSoci_clicked(const QModelIndex& index) {
}
}
}
}