TabBar from QtQuick.Controls selects a page in StackLayout from QtQuick.Layouts.
qml6 tabs.qml
The stack's currentIndex binds to the tab bar's currentIndex.
Each direct StackLayout child is one page, and layout attached properties let the stack consume remaining space.
Adding a tab requires a corresponding page at the same index.
Use SwipeView only when swipe navigation is actually required, then establish one clear owner for the synchronized current index.
# 07: Tabs
`TabBar` from `QtQuick.Controls` selects a page in `StackLayout` from `QtQuick.Layouts`.
```sh
qml6 tabs.qml
```
The stack's `currentIndex` binds to the tab bar's `currentIndex`.
Each direct StackLayout child is one page, and layout attached properties let the stack consume remaining space.
Adding a tab requires a corresponding page at the same index.
Use `SwipeView` only when swipe navigation is actually required, then establish one clear owner for the synchronized current index.