ToolButton QML Type
Schaltfläche mit einem für ToolBar geeigneten Aussehen. Mehr...
Import Statement: | import QtQuick.Controls |
Inherits: |
Detaillierte Beschreibung
ToolButton ist funktionell ähnlich wie Button, bietet aber ein Aussehen, das besser zu ToolBar passt.
ToolBar { RowLayout { anchors.fill: parent ToolButton { text: qsTr("‹") onClicked: stack.pop() } Label { text: "Title" elide: Label.ElideRight horizontalAlignment: Qt.AlignHCenter verticalAlignment: Qt.AlignVCenter Layout.fillWidth: true } ToolButton { text: qsTr("⋮") onClicked: menu.open() } } }
ToolButton erbt seine API von AbstractButton. Sie können zum Beispiel text einstellen, ein Symbol anzeigen und auf clicks reagieren, indem Sie die API von AbstractButton verwenden.
Siehe auch ToolBar, ToolButton anpassen und Button Controls.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.