Loop through the elements or see QSortFilterProxyModel.
Loop through the elements or see QSortFilterProxyModel.
Thank u....
I tried like this....
Qt Code:
QList<QTableWidgetItem *> LTempTable =temp->findItems("001",Qt::MatchEndsWith); cout<<"the matched count:"<<LTempTable.count()<<endl; foreach(rowPtr,LTempTable) { rowPtr->setBackground(Qt::red); }To copy to clipboard, switch view to plain text mode
But it is highlighting only that particular item, i want to highlight that whole row...
How can i do that?
Put in a for loop and set the background on all items in the same row as the matched item.
Alternatively you could use the QTableWidget selection with selection mode QAbstractItemView::ExtendedSelection and selection behaviour QAbstractItemView::SelectRows.
aurora (5th January 2012)
Bookmarks