2012-08-07 5 views

Répondre

3

Vous pouvez utiliser QAbstractItemModel::match()

QAbstractItemModel *model = table->model(); 
QModelIndexList matches = model->match(model->index(0,0), Qt::UserRole, "ID001") 

foreach(const QModelIndex &index, matches) 
{ 
    QTableWidgetItem *item = table->item(index.row(), index.column()) 
    // Do something with your new-found item ... 
} 
Questions connexes