I have a QTreeWidget with several QComboBoxes as QTreeWidgetItems. I am trying to find a way to get the current QTreeWidget row of the selected QComboBox. ui->sensorTree is the QTreeWidget. My tree looks something like this:
parent0
child0 QComboBox0
child1 QComboBox1
parent1
child0 QComboBox0 QComboBox0
child1 QComboBox1 QComboBox1
So if QComboBox0 was selected I would want to return 0.
Update:
int index = ui->sensorTree->currentIndex().row();
This gives me the correct row. The problem now is that the row does not have to be selected to change the QComboBox. What I need is to connect QComboBox.indexChanged to pass the row the ComboBox is in, and the current ComboBox text of all ComboBoxes in the row.