Contents

Tabs

The Tabs class provides an environment where multible Tab children can be added, and the user is presented with a tab bar with tab buttons to select different tab pages. More...

Properties

Signal Handlers

Detailed Description

Examples:

MainView {
    Tabs {
        Tab {
            title: "tab 1"
            page: Page {
                Text {
                    anchors.centerIn: parent
                    text: "This is the first tab."
                }
            }
        }
        Tab {
            title: "tab 2"
            iconSource: "icon.png"
            page: Page {
                Rectangle {
                    anchors.fill: parent
                    Text {
                        anchors.centerIn: parent
                        text: "Colorful tab."
                    }
                }
                color: "lightblue"
            }
        }
        Tab {
            title: "tab 3"
            page: Qt.resolvedUrl("MyCustomPage.qml")
        }
    }
}

Use Tabs inside a MainView and use Page items for the page property of Tab to enable automatic header and toolbar.

Property Documentation

read-onlycurrentPage : Item

The page of the currently selected tab.


headerContents : Component

Header contents that will be used to override the default title inside the header, and provides scrollable tab buttons.


read-onlyselectedTab : Tab

This documentation is under development and is subject to change.

The currently selected tab.


selectedTabIndex : int

This documentation is under development and is subject to change.

The index of the currently selected tab. The first tab is 0, and -1 means that no tab is selected. The initial value is 0 if Tabs has contents, or -1 otherwise.


tools : ToolbarActions

This documentation is deprecated.

This property is deprecated. Pages will now automatically update the toolbar when activated.


Signal Handler Documentation

Tabs::onToolsChanged()