TabBar QML Type | Qt Labs Controls 5.6

Qt 5.6 | Qt Labs Controls | QML Types | TabBar QML Type

Qt 5.6.3 Reference Documentation

# TabBar QML Type

A tab bar control. More...

Import Statement: | import Qt.labs.controls 1.0
Inherits: | Container

- List of all members, including inherited members

## Detailed Description

TabBar provides a tab-based navigation model.

TabBar is populated with TabButton controls, and can be used together with any layout or container control that provides `currentIndex` -property, such as StackLayout or SwipeView

      TabBar {
          id: bar
          width: parent.width
          TabButton {
              text: qsTr("Home")
          }
          TabButton {
              text: qsTr("Discover")
          }
          TabButton {
              text: qsTr("Activity")
          }
      }

      StackLayout {
          width: parent.width
          currentIndex: bar.currentIndex
          Item {
              id: homeTab
          }
          Item {
              id: discoverTab
          }
          Item {
              id: activityTab
          }
      }

Note: Types in the Qt.labs module are not guaranteed to remain compatible in future versions.

See also TabButton, Customizing TabBar, Navigation Controls, and Container Controls.