Provides a tab button with an image or a label that the user can click. More...
This element was introduced in Qt Quick Components 1.0.
A tabbed interface is made up of tab buttons and content for each button. A tab button is usually positioned by the TabBarLayout, but compatible with other QML positioning mechanisms such as Row or Column elements. When positioned in a ToolBar, the ButtonRow is used for positioning.
On the Symbian platform, a tab button can be also be positioned with the TabBar.
When adding buttons to a layout, you need to associate a tab button with the content for the tab. You also set the text or image for the button. The code snippet below shows a TabBarLayout with three tab buttons. Each button has a text title and refers to the id of the tab content associated with the button.
// define a tab bar layout with three buttons and link them to the content TabBarLayout { id: tabBarLayout anchors { left: parent.left; right: parent.right; top: parent.top } TabButton { tab: tab1content; text: "Tab 1" } TabButton { tab: tab2content; text: "Tab 2" } TabButton { tab: tab3content; text: "Tab 3" } }
See the TabGroup documentation for more information about creating a tabbed interface.
See also TabBarLayout, TabGroup, and TabBar.
The value is true if this button is the button for the currently activated tab. Otherwise it is false.
This is a read-only property and therefore should not be manipulated by the user.
The URL for an image to be shown on the button. The default value is an empty string. Icons are automatically coloured with theme colours. TabButton treats svg images as icons. Other image formats and images with http scheme are not colored.
Symbian:
If platformInverted is true, the component is visualized with the inverted style. For more information, see Using Inverted Style with Symbian Components. By default platformInverted is false.
This property group was introduced in Qt Quick Components 1.1.
The value is true if the user is currently pressing the tab button. Otherwise it is false.
This is a read-only property and therefore should not be manipulated by the user.