Kirigami2

ActionMenuItem.qml
1/*
2 * SPDX-FileCopyrightText: 2018 Aleix Pol Gonzalez <aleixpol@kde.org>
3 * SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8import QtQuick
9import QtQuick.Controls as QQC2
10import org.kde.kirigami as Kirigami
11
12QQC2.MenuItem {
13 visible: !(action instanceof Kirigami.Action) || action.visible
14 autoExclusive: action instanceof Kirigami.Action && action.autoExclusive
15 height: visible ? implicitHeight : 0
16
17 QQC2.ToolTip.text: (action instanceof Kirigami.Action) ? action.tooltip : ""
18 QQC2.ToolTip.visible: hovered && QQC2.ToolTip.text.length > 0
19 QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
20
21 Accessible.onPressAction: action.trigger()
22}
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 3 2025 11:48:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.