tableWidget的相关内容,读取tablewidget内的,各单元格数据,包括LineEdit,ComboBox的内容。
代码如下:
QString name;
for(int i = 0; i < tableWidget->rowCount(); ++i)
{
QMessageBox::information(this,tr("skfs"),tr("out"));
for( int j = 0; j < tableWidget->columnCount(); ++j)
{
QMessageBox::information(this,tr("skfs"),tr("inner"));
name = tableWidget->item(i,j)->text();
QMessageBox::information(this,tr("skfs"),tr("here?"));
if(name == tr("TCPPort"))
TCPPort = name.toInt();
else if(name == tr("TCPIP"))
UDPPort = name.toInt();
}
}
当执行到name = tableWidget->item(i,j)->text();时,程序就自动退出,
求各位大侠指导,纠正原因