问题
How get ItemIndex from one ComboBox and send to another ComboBox? Both Comb's created in QTableWidget
QComboBox *comboA = static_cast<QComboBox*>(ui->tableWidget->cellWidget(0,0));
QComboBox *comboB = static_cast<QComboBox*>(ui->tableWidget->cellWidget(0,1));
QObject::connect(comboA, SIGNAL(currentIndexChanged(int)),comboB, SLOT(setCurrentIndex(int)));
But this code does not work. Rather, it is necessary to define new methods for pointers.
来源:https://stackoverflow.com/questions/17748109/qt-qcombobox-currentindexchanged-signal