Qt 5.7 | Qt Quick Controls 2 | QML Types | ToolButton QML Type

Qt 5.7.1 Reference Documentation

# ToolButton QML Type

A button with a layout suitable for a ToolBar. More...

Import Statement: | import QtQuick.Controls 2.0
Since: | Qt 5.7
Inherits: | Button

- List of all members, including inherited members

## Detailed Description

ToolButton is functionally similar to Button, but provides a look that is more suitable within a ToolBar.

      ToolBar {
          RowLayout {
              anchors.fill: parent
              ToolButton {
                  text: qsTr("\u25C0 Qt")
                  onClicked: stack.pop()
              }
              Item { Layout.fillWidth: true }
              Switch {
                  checked: true
                  text: qsTr("Notifications")
              }
          }
      }

See also ToolBar, Customizing ToolButton, and Button Controls.