Button Component for TabBars More...
Inherits Button
This element was introduced in qt-components 4.7.
The TabButton class provides correct styling for a tab button. It is used together with the ToolBarLayout and TabGroup.
ToolBarLayout { ToolIcon { iconId: "toolbar-back"; onClicked: pageStack.pop(); } ButtonRow { style: TabButtonStyle { } TabButton { text: "Tab1" tab: tab1 } TabButton { text: "Tab2" tab: tab2 } TabButton { text: "Tab3" tab: tab3 } }
When TabGroup is used, items inside the TabGroup must have the same id names as the TabButton tabs have. When Tab1 is pressed tab1 is shown, in next example that is a new PageStack.
For example:
TabGroup { id: tabGroup currentTab: tab1 PageStack { id: tab1 } PageStack { id: tab2 } Page { id: tab3 Column { spacing: 10 Text { text: "This is a single page" } } } }
platformStyle : bool |
Platform specific property to define the style of the button.
tab : bool |
Tab associated to the given TabButton.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.