I'm trying this approach: to use QSqlRecord QSqlQueryModel::record(int row) in a for loop to check each row in the table; from each row I got the content of the desired field using QVariant QSqlRecord::value(int index).
Well, this in theory because with the code below I have an empty value returned from QSqlRecord::value() and so comparison fails
Qt Code:
for(int i = 0; i < numRows; i++) { if(record.value(field) != ui->articleComboBox->itemData(ui->articleComboBox->currentIndex())) ui->scoopsTableView->hideRow(i); }To copy to clipboard, switch view to plain text mode
Where is my error?




Reply With Quote

Bookmarks