Search code examples
qtqt5qstackedwidget

QStackedLayout in Qt Designer


I can use a QStackedWidget fine in Qt Creator, but it has buttons that allow the user to change the current page. I only want to do that programmatically. Unfortunately there doesn't seem to be a Stacked Layout anywhere in the form editor. Is there any way I can use a QStackedLayout in Qt Designer?


Solution

  • Oh so actually the buttons of a QStackedWidget are apparently only shown in design mode, so you can just use a QStackedWidget. I thought they'd still be in the program because they also there when you preview the form, but I guess the form preview uses the same engine as the form designer.