int index=ui->tableWidget->rowCount(); ui->tableWidget->insertRow(index); ui->tableWidget->setItem(index,0,new QTableWidgetItem(name)); ui->tableWidget->setItem(index,1,new QTableWidgetItem(sex)); ui->tableWidget->setItem(index,2,new QTableWidgetItem(QString::number(age))); ui->tabl...
lineList = lineStr.split('\t'); //去除换行符获取字符串,存放到表中 //向表里面动态添加参数 int rowCount = ui->tableWidget->rowCount(); ui->tableWidget->insertRow(rowCount); for(int i = 0; i < 4; i++) { ui->tableWidget->setItem(rowCount,i,new QTableWidgetItem(lineList[i]));...