johnnyturbo3
3rd September 2010, 10:05
Hi,
I want to be able to extract a specific column's data using a row index. For example, my table is populated using an SQL query, when a user selects an item from the table the whole row is highlighted. From this highlighted row, I want to extract the 2nd column row as a String value.
I have the following code/slot for when the table is selected:
void GUI::receviedIndex( const QModelIndex &index ){
QString temp = QString::number(index.row());
QMessageBox::critical(0, QObject::tr("Testing"),temp);
}
I've tried a couple of things without success. Can anyone suggest what classes/methods to look at in order to achieve this?
Thanks
I want to be able to extract a specific column's data using a row index. For example, my table is populated using an SQL query, when a user selects an item from the table the whole row is highlighted. From this highlighted row, I want to extract the 2nd column row as a String value.
I have the following code/slot for when the table is selected:
void GUI::receviedIndex( const QModelIndex &index ){
QString temp = QString::number(index.row());
QMessageBox::critical(0, QObject::tr("Testing"),temp);
}
I've tried a couple of things without success. Can anyone suggest what classes/methods to look at in order to achieve this?
Thanks