Kirigami2
8 import QtQuick.Controls 2.1 as QQC2
9 import org.kde.kirigami 2.14 as Kirigami
26 property Action action:
null
33 property alias acceptedButtons: area.acceptedButtons
39 property alias mouseArea: area
41 activeFocusOnTab:
true
42 Accessible.role: Accessible.Button
44 Accessible.onPressAction: control.clicked({
"button":
Qt.LeftButton})
46 text: action ? action.text :
""
47 enabled: !action || action.enabled
54 font.bold: activeFocus
55 font.underline: control.enabled
56 color: enabled ? Kirigami.Theme.linkColor : Kirigami.Theme.textColor
57 horizontalAlignment: Text.AlignHCenter
58 verticalAlignment: Text.AlignVCenter
59 elide: Text.ElideRight
61 signal pressed(var mouse)
62 signal clicked(var mouse)
64 Keys.onPressed:
event => {
70 control.clicked({
"button":
Qt.LeftButton});
71 event.accepted =
true;
74 control.pressed({
"button":
Qt.RightButton});
75 event.accepted =
true;
84 cursorShape:
Qt.PointingHandCursor
86 onClicked: mouse => control.clicked(mouse)
87 onPressed: mouse => control.pressed(mouse)
An item that represents an abstract Action.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:14:23 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.