Warning, /frameworks/qqc2-desktop-style/tests/LineEditWithClearButton.qml is written in an unsupported language. File is not indexed.

0001 /*
0002    SPDX-FileCopyrightText: 2019 Montel Laurent <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 import org.kde.kirigami 2.20 as Kirigami
0008 
0009 Kirigami.ActionTextField {
0010     id: root
0011 
0012     focus: true
0013     rightActions: Kirigami.Action {
0014         iconName: "edit-clear"
0015         visible: root.text !== ""
0016         onTriggered: {
0017             root.text = ""
0018             root.accepted()
0019         }
0020     }
0021 }