1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/QtClient/JoplinQtClient/EditableListDelegate.qml
2016-12-29 20:19:00 +01:00

40 lines
621 B
QML
Executable File

import QtQuick 2.0
import QtQuick.Controls 2.0
Component {
Item {
width: parent.width
height: 25
Text {
id: label
text: display
anchors.fill: parent
MouseArea {
anchors.fill: parent
onClicked: {
listView.currentIndex = index
}
onDoubleClicked: {
label.visible = false
textField.visible = true
textField.focus = true
}
}
}
TextField {
id: textField
text: display
visible: false
width: parent.width
height: parent.height
onAccepted: {
}
onEditingFinished: {
label.visible = true
textField.visible = false
}
}
}
}