16,211
社区成员
发帖
与我相关
我的任务
分享
ui->customerInfoView->setSelectionMode(QAbstractItemView::SingleSelection);
ui->customerInfoView->setSelectionBehavior(QAbstractItemView::SelectRows);
QModelIndexList indexes = selectModel->selectedIndexes();
int idxCnt = indexes.size();
if (idxCnt <= 0) {
QMessageBox::warning(this, _tr("提示"), _tr("请选择"));
return;
}
QModelIndex selectedIndex = indexes[0];