Hi,
I am currently using the QTableWidget, and some of the fields need to have a dropdown menu, so I inserted some QComboBoxes.
ui->tableWidget->setCellWidget(0,i,myComboBox);
QComboBox* myComboBox = new QComboBox();
ui->tableWidget->setCellWidget(0,i,myComboBox);
To copy to clipboard, switch view to plain text mode
Now I need to be able to retrieve the QComboBox Index whenever someone changes a dropdown box.
For the normal cells inside my table, I am using:
on_tableWidget_cellChanged(int row, int column)
{
}
on_tableWidget_cellChanged(int row, int column)
{
QTableWidgetItem *myItem = ui->tableWidget->item(row,column);
}
To copy to clipboard, switch view to plain text mode
But this does not tell me when one of the QComboBoxes is manipulated by the user.
Does anyone know how I can setup a function which is called whenever the user changes one of the QComboBoxes?
Bookmarks