16,240
社区成员
发帖
与我相关
我的任务
分享
QObject::connect(m_pTbOdView, SIGNAL(clicked(QModelIndex )), this, SLOT(showOrderDetails(QModelIndex))); //这是点击一行激发的事件
void COrderMgn::showOrderDetails(const QModelIndex & current)
{
//这里如何获得这一行第一列中的内容呢?
return;
}
QModelIndexList modellist = tableViewGzData->selectionModel()->selectedRows();
for (int i = 0; i < modellist.size(); i++)
{
QMessageBox::information(this, "", QString::number(modellist[i].row()));
}