void PatVerticalTabWidget::setCurrentIndex(int index) { int yPos = 25; for(int i = 0; i < m_buttonGroup->buttons().size(); i++) { QAbstractButton * button = m_buttonGroup->button(i); button->move(0,yPos); yPos += button->height(); // Ignore clicks to the already active tab if(button->isEnabled() && button->isChecked() && currentIndex != index){ currentIndex = index; emit tabSelected(i); } } QTimer::singleShot(0, this, SLOT(refreshIcons())); }