Solved How to navigate from one page to another?
-
I'm in a Qt Widget Application, and I'm using Stacked Widget. The problem is I don't know how to navigate to the next or prev Stack using a Push Button Widget. Can anyone help me out? Thanks in advance.
-
Hi and welcome to the forums.
Its index based so you simply call
setCurrentIndex(int index)
it also has currentIndex()
so you can say
int indx = ui->stackedwidget-> currentIndex();
ui->stackedwidget->setCurrentIndex(indx +1 ); to go to next and
ui->stackedwidget->setCurrentIndex(indx -1 ); -
Thank you so much sir! :))