Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The qstackedwidget command creates a QStackedWidget object. This container widget has the ability to stack child widgets on top of each other like pages in a book. It is similar to a qtabwidget but without the tabs. The widgets to be stacked are created separately and added using the qaddwidget command.

Only one widget at a time is visible in the QWidgetStack. To select which one, invoke the qsetcurrentwidget command with the widget id as argument.

...

Example QStackedWidget shows a QStackedWidget with two pages. Each page contains a texteditor of type QTextEdit added with the qaddwidget command. To switch between the pages two buttons are created, one for each page. When pushed they call qsetcurrentwidget, providing the desired visible widget as argument.