change main tab for every click

This commit is contained in:
garakmon 2020-04-21 16:15:36 -04:00
parent 9e883a8a2f
commit f57ef7a819

View file

@ -1208,6 +1208,8 @@ void MainWindow::on_action_Exit_triggered()
void MainWindow::on_mainTabBar_tabBarClicked(int index)
{
ui->mainTabBar->setCurrentIndex(index);
int tabIndexToStackIndex[5] = {0, 0, 1, 2, 3};
ui->mainStackedWidget->setCurrentIndex(tabIndexToStackIndex[index]);