Cannot set current tab
-
Am I missing something ?
Is there a way to actually debug the code in real time to see why this does not work ?
I have "cascaded tabs" , even trying to set both in sequence - expecting the #6 tab to be selected - does not work.
ui->tabWidget->setCurrentIndex(3); ui->tabWidget->setCurrentIndex(6); -
Am I missing something ?
Is there a way to actually debug the code in real time to see why this does not work ?
I have "cascaded tabs" , even trying to set both in sequence - expecting the #6 tab to be selected - does not work.
ui->tabWidget->setCurrentIndex(3); ui->tabWidget->setCurrentIndex(6);@AnneRanch said in Cannot set current tab:
I have "cascaded tabs"
What does this mean? A QTabWidget in another QTabWidget? If so - are you accessing the correct widget? Check also QTabWidget::count() and QTabWidget::currentIndex().
-
SOLVED
user error - I was not waiting for time consuming process to finish. -
SOLVED
user error - I was not waiting for time consuming process to finish.@AnneRanch
ADDENDUM
It looks as having "main tab" with "sub tabs" - what I called "cascade" tabs is THE PROBLEM.
To get from "main tab" ( tab index 0) to "subtab " ( tab index 8 ) the following hack works.
So it is a two step process:
ui->tabWidget_2->setCurrentIndex(3); main tab selection ui->tabWidget_4->setCurrentIndex(8); sub tab selection