//QTableWidget获取表格单元的Widget类型
auto test = (tableWidget->cellWidget(rowNum, 1));
qDebug() << test->metaObject()->className();
//给QTableWidget添加QComboBox
QComboBox *comboBox = new QComboBox();
comboBox->addItems( combolist );
tableWidget->setCellWidget( rowNum, 1, comboBox );
//判断单元格是QComboBox还是普通Item
//是QComboBox
if( tableWidget->cellWidget(i, 1) != NULL )
{
auto cellWidget = ( tableWidget->cellWidget(i, 1) );
ComboBox *combox=(QComboBox*)cellWidget;
sInsert = combox->currentText();
insertValue.append( sInsert );
}
//普通表格单元
else
{
//
}