c++ - Qt: How to display QComboBox inside QTableWidgetItem? -
i’m trying display qcombobox inside qtablewidgetitem setting child, using code:
qcombobox* qcb; int r,c; //...... qcb->setparent((qwidget*)tablewidget->item(r,c));
but didn’t job.
so how fix that? thanks.
you via qtablewidget
object itself.
- firstly create qcombobox
- then call
void qtablewidget::setcellwidget ( int row, int column, qwidget * widget )
http://qt-project.org/doc/qt-4.8/qtablewidget.html#setcellwidget
Comments
Post a Comment