Row selection
-
Hi, thanks for the reply. Yes, I set that flag to true but I can select a row by clicking indivual cell or horizontal header. I've overriden flags function in my model if I remove isSelectable flag i can't select anything.
Qt::ItemFlags TableModel::flags(const QModelIndex &index) const { if(!index.isValid()) { return Qt::ItemIsEnabled; } if(index.column() == 1) { if(modelList.at(index.row()).isArray) { return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsEditable; } return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable; } return Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable; }