How to use QStackedWidget in GUI?

后端 未结 1 1250
天命终不由人
天命终不由人 2021-01-18 12:37

I am new to Qt and am have to make a GUI having multiple windows for this I found QStackedWidget class using Qt designer tools.

I added QStackedWi

1条回答
  •  心在旅途
    2021-01-18 13:00

    The QStackedWidget class provides a stack of widgets where only one widget is visible at a time.

    Your are new to Qt so i suggest you to use Qt Designer:

    You can drag&drop StackedWidget to your form, customized it then use arrows to go to next page and work on it too.

    StackedWidget like a vector you can access to them via indexes.

    ui->stackedWidget->setCurrentIndex(1);
    

    0 讨论(0)
提交回复
热议问题