Warning, /plasma/plasma-sdk/lookandfeelexplorer/package/contents/ui/FormField.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
0003  *
0004  *   SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 import QtQuick 2.3
0008 import QtQuick.Layouts 1.1
0009 import QtQuick.Controls 2.15
0010 import org.kde.kirigami 2.3 as Kirigami
0011 
0012 TextField {
0013     id: field
0014     property string key
0015     property string label
0016     Kirigami.FormData.label: label
0017     text: lnfLogic[key]
0018     Layout.minimumWidth: Kirigami.Units.gridUnit * 15
0019     onAccepted: {
0020         lnfLogic.name = text;
0021         timer.running = false;
0022     }
0023     onTextChanged: timer.restart()
0024     Timer {
0025         id: timer
0026         interval: 1000
0027         onTriggered: lnfLogic[key] = field.text
0028     }
0029 }