How can I initialize a default value of QComboBox without to click it?
c++, qt
Solution
I solved the problem. The `ui->combBox->setCurrentIndex(1);` was in constructor before `connect(ui->combBox,SIGNAL(currentIndexChanged(int))`.... @Nikos C. thank you very much for a good tip.
Problem
How can I initialize a default value of QComboBox without to click it? I tried with ``` ui->combBox->setCurrentIndex(1); ``` but when I read the value at first I get unfortunately a -1 and only after the QComboBox was clicked its value become 1.