I've got a QTableWidget
with some columns inside.
Due to my needs I set QComboBox
inside some columns and fill them with necessary data.
void settingsDialog::onAddFieldButtonClicked()
{
fieldsTable->setRowCount(++rowCount);
combo = new QComboBox();
combo->addItem(QString("Choose from list..."));
foreach( int height, heightsAvailable)
combo->addItem(QString("%1").arg(height));
fieldsTable->setCellWidget(rowCount-1, 3, combo);
// etc for other columns ...
}
The quetsion is how to catch signals from this combo boxes if they were changed?
I want to know row
and col
of changed widget (combo box) and the value which was set.
I've tried all available signals which are mentioned in Qt docs for QTableWidget
, but they work only if cell doesn't have widget inside it.
Is there a simple and Qt-way to get what I need?