Search for usage in LXR

Inheritance diagram for TabBar:


alias content
alias interactive
alias leftContent
alias rightContent
bool showNewTabButton
bool showTabs


void newTabClicked ()
void newTabFocused (int index)

Public Member Functions

void positionViewAtIndex (index)

Detailed Description

Tab bar alternative to QQC TabBar, and based on it.

This controls inherits from QQC2 TabBar, to checkout its inherited properties refer to the Qt Docs.

Mostly used together with the TabView control.

The layout of this control is divided into three sections: left, middle and right area. The middle area is reserved for placing the tab buttons. The right and left side areas can be populated with any child item.

All the child items are expected to be a TabButton or inherit from it. If you need to add an extra button, label or other item, consider adding them using the left and right containerizes.

See also
text: "Button1"
text: "Button2"
text: "Button3"
Tab bar alternative to QQC TabBar, and based on it.
Definition TabBar.qml:52
alias leftContent
An alias to add elements to the left area section.
Definition TabBar.qml:63
alias rightContent
An alias to add elements to the right area section.
Definition TabBar.qml:68


The contents of this bar will become flickable/scrollable if the implicit width of the child elements is higher than the available width. When using it on a mobile device and a flick/swipe action is performed by the user, a signal will be emitted informing about the tab focused in the view port.

See also
This control supports the attached Controls.showCSD property to display the window control buttons when using CSD.

Definition at line 52 of file TabBar.qml.

Property Documentation

◆ content

list< QtObject > TabBar::content

An alias to manually add elements to the container directly.

This is the middle section of the control.

Definition at line 58 of file TabBar.qml.

◆ interactive

bool TabBar::interactive

Whether the control will react to touch events to flick the tabs.

Definition at line 73 of file TabBar.qml.

◆ leftContent

list< QtObject > TabBar::leftContent

An alias to add elements to the left area section.

Definition at line 63 of file TabBar.qml.

◆ rightContent

list< QtObject > TabBar::rightContent

An alias to add elements to the right area section.

Definition at line 68 of file TabBar.qml.

◆ showNewTabButton

bool TabBar::showNewTabButton

Whether to display a button which represents the "add new tab" action.

If this button is clicked a signal is triggered.

See also

Definition at line 79 of file TabBar.qml.

◆ showTabs

bool TabBar::showTabs

Whether the tab buttons will be visible or not.

Definition at line 83 of file TabBar.qml.

Member Function Documentation

◆ newTabClicked

void TabBar::newTabClicked ( )

This signal is emitted when the "add new tab" button has been clicked.

See also

◆ newTabFocused

void TabBar::newTabFocused ( int index)

This signal is emitted when a new tab button is focused after a swipe/flick action has been performed.

To set the new focused tab as the current one, use the index value passed as the argument to the currentIndex property. To make sure the tab is fully visible in the view port you can use the positioning function.

See also

◆ positionViewAtIndex()

void TabBar::positionViewAtIndex ( index )

Positions the TabButton at the given index to be centered and visible.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:16:19 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.