ToolBarLayout is a container for items on a toolbar that automatically implements an appropriate layout for its children. More...
You use a ToolBarLayout when you specify the tools that go into a tool bar. The toolbar layout container lays out the tools appropriately for the platform.
The code snippet below gives an example of how to use a ToolBarLayout.
### needs to come from a real application
// Create a tool bar
ToolBar {
id: bar3
anchors.bottom: parent.bottom
// Inside a toolbar layout, specify one toolbar tool and the back button
tools: ToolBarLayout {
backButton: true
ToolButton {
iconSource: "qrc:tb_plus.png"
onClicked: stack.pop()
}
}
}
This determines whether or not the first child is a back button. The back button always occupies the leftmost space in layout. If there is no backbutton this space is always empty.
Returns the width of the given child button in the toolbar layout.
Applies the layout rules to the buttons in the toolbar.
In the case of a Symbian toolbar, the layout rules are as follows: