For example we have a table view called tblShops. and implemented a doubleClicked signal
The Shop ID is located in the first column of the model SqlQuery so to get the ID of the Shop in the row clicked use following snippet:
void wndTabStructure
::on_tblShops_doubleClicked
(QModelIndex index
)
{
QString s = ui->tblShops->model()->data(
ui->tblShops->model()->index( index.row() , 0 ) )
.toString();
QMessageBox::information(NULL,"", s );
}
Post being viewed right now
Item date: 25.09.2009
Views: 429
Item date: 25.09.2009
Views: 1570
Item date: 01.01.2009
Views: 341
Item date: 09.03.2009
Views: 1392
Item date: 22.08.2009
Views: 710
Item date: 06.02.2009
Views: 976
Item date: 18.04.2009
Views: 3743
Item date: 13.05.2009
Views: 1154
Item date: 12.04.2009
Views: 888
Item date: 24.08.2009
Views: 1581