You changing the QComboBox item programatically, this is emit currentIndexChanged(int) , not activated(int). Do the changes below
//connect(opComboBox, SIGNAL(activated(int)), myStack, SLOT(setCurrentIndex(int))); //<<<<<<<<<<<<<<<< Change to next line
connect(opComboBox, SIGNAL(currentIndexChanged(int)), myStack, SLOT(setCurrentIndex(int)));
//connect(opComboBox, SIGNAL(activated(int)), myStack, SLOT(setCurrentIndex(int))); //<<<<<<<<<<<<<<<< Change to next line
connect(opComboBox, SIGNAL(currentIndexChanged(int)), myStack, SLOT(setCurrentIndex(int)));
To copy to clipboard, switch view to plain text mode
Note that your QComboBox is hidded, if you show it and change the item directly in combo box then the activated(int) signal will be emited (and also currentIndexChanged(int) signal)
Bookmarks