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 height: visible ? implicitHeight : 0
15
16 QQC2.ToolTip.text: (action instanceof Kirigami.Action) ? action.tooltip : ""
17 QQC2.ToolTip.visible: hovered && QQC2.ToolTip.text.length > 0
18 QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
19
20 Accessible.onPressAction: action.trigger()
21}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.