8import QtQuick.Controls as QQC2
9import QtQuick.Templates as T
10import org.kde.kirigami as Kirigami
27 property T.Action action
34 property alias acceptedButtons: area.acceptedButtons
40 property alias mouseArea: area
42 activeFocusOnTab: true
43 Accessible.role: Accessible.Button
45 Accessible.onPressAction: clicked({ button: Qt.LeftButton })
47 text: action?.text ?? ""
48 enabled: action?.enabled ?? true
50 onClicked: action?.trigger()
52 font.bold: activeFocus
53 font.underline: enabled
54 color: enabled ? Kirigami.Theme.linkColor : Kirigami.Theme.textColor
55 horizontalAlignment: Text.AlignHCenter
56 verticalAlignment: Text.AlignVCenter
57 elide: Text.ElideRight
59 signal pressed(var mouse)
60 signal clicked(var mouse)
62 Keys.onPressed: event => {
68 control.clicked({ button:
Qt.LeftButton });
69 event.accepted =
true;
72 control.pressed({ button:
Qt.RightButton });
73 event.accepted =
true;
82 cursorShape:
Qt.PointingHandCursor
84 onClicked: mouse => control.clicked(mouse)
85 onPressed: mouse => control.pressed(mouse)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:20 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.