ean5533
10th March 2009, 04:21
This is my first post here, so be gentle...
I have a QTableWidget that I'm populating with QComboBox's and QSpinBox's. For example...
QTableWidget *table = new QTableWidget(this);
QComboBox *cmbEx = new QComboBox(table);
table->setCellWidget->(2, 2, cmbEx);
However, now when I run the form and click on that combobox, it does not activate the cell it is in. For example, if I'm currently in cell [1,1], and I click on that combobox I created, the table does NOT change to cell [2,2] like it should -- it stays in cell [1,1]. If I use the TAB key to move into the combobox, the cell changes just fine.
Is there something I need to do to force the QTableWidget to be aware that I have clicked on the QComboBox and force it to change cells?
Thanks,
-Evan
I have a QTableWidget that I'm populating with QComboBox's and QSpinBox's. For example...
QTableWidget *table = new QTableWidget(this);
QComboBox *cmbEx = new QComboBox(table);
table->setCellWidget->(2, 2, cmbEx);
However, now when I run the form and click on that combobox, it does not activate the cell it is in. For example, if I'm currently in cell [1,1], and I click on that combobox I created, the table does NOT change to cell [2,2] like it should -- it stays in cell [1,1]. If I use the TAB key to move into the combobox, the cell changes just fine.
Is there something I need to do to force the QTableWidget to be aware that I have clicked on the QComboBox and force it to change cells?
Thanks,
-Evan