1/* 2 * SPDX-FileCopyrightText: 2020 Arjen Hiemstra <ahiemstra@heimr.nl> 3 * 4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 */ 6 7import QtQuick 2.12 8import QtQuick.Controls 2.2 9 10import org.kde.kirigami 2.2 as Kirigami 11 12BaseCellDelegate { 13 id: delegate 14 15 leftPadding: Kirigami.Units.smallSpacing 16 17 property alias text: label.text 18 19 contentItem: Label { 20 id: label 21 text:model.display != undefined ? model.display : "" 22 maximumLineCount: 1 23 elide: Text.ElideRight 24 horizontalAlignment: Text.AlignHCenter 25 } 26 27 ToolTip.text: delegate.text 28 ToolTip.delay: Kirigami.Units.toolTipDelay 29 ToolTip.visible: hovered && label.truncated 30} 31