您的位置:首页 > 编程语言 > Qt开发

QT 获得tableWidget中QComboBox的内容

2012-05-07 20:21 676 查看
QWidget * QTableWidget::cellWidget ( int row, int column ) const

Returns the widget displayed in the cell in the given row and column.


QWidget * widget=ui->tableWidget->cellWidget(i,0);//获得widget

QComboBox *combox=(QComboBox*)widget;//强制转化为QComboBox

QString string=combox->currentText();
 qDebug()<<string;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: