I need an advise...
I need a widget that would go throug the whole model and do some comparing with items in it...then when comparing passes I need to select a row on which the item is...
So I wrote this code:
if(model->rowCount()){
for(int row=0; row<model->msgList.size();++row){
const QVcaCanMsg &msg = model->msgList.at(row);
if((msg.id()==id) && (msg.flags()==flags)){
msgLogView->selectRow(row);
}
}
}
if(model->rowCount()){
for(int row=0; row<model->msgList.size();++row){
const QVcaCanMsg &msg = model->msgList.at(row);
if((msg.id()==id) && (msg.flags()==flags)){
msgLogView->selectRow(row);
}
}
}
To copy to clipboard, switch view to plain text mode
But the problem is that it selects one after another so only the last item that passes the comparing stays selected in a view...
Is there any way how to make it so ALL items that pass the comparing will get selected ?
Thanks
Bookmarks