在 tablewidget中插入combobox
for i in range(cur_row_count):
cb1=QComboBox()
cb1.addItems(['男','女'])
self.tableWidget.setCellWidget(i,10,cb1)
gender =self.tableWidget.cellWidget(i,10).currentText()
运行后 提示 'QComboBox' object has no attribute 'currenttext'