Hello anyone,
In a QTableWidget you can update a item.
But is it possible to update a row when you click on the row in QTable through a QDialog.
I want to see the items in a row in the QLineEdits in QDialog.
{
int row;
contactTable->selectRow(row);
{
contactDialog dlg(this);
dlg.leBedrijf->setText(item->text());
dlg.leContact->setText(item->text());
dlg.leTel->setText(item->text());
if(dlg.
exec() == QDialog::Accepted) { }
return;
}
}
}
void ContactWindow::edit(QTableWidgetItem *item )
{
int row;
contactTable->selectRow(row);
{
contactDialog dlg(this);
dlg.leBedrijf->setText(item->text());
dlg.leContact->setText(item->text());
dlg.leTel->setText(item->text());
if(dlg.exec() == QDialog::Accepted) {
}
return;
}
}
}
To copy to clipboard, switch view to plain text mode
There must be some changes in the code it only display one item.
Bookmarks