# HG changeset patch # User Yuya Nishihara # Date 1579333442 -32400 # Sat Jan 18 16:44:02 2020 +0900 # Node ID 6c665f8863638695567bcd6dc2fe0369de098131 # Parent 57b1858016442f3b1b62d18aa85e26306a13b1b9 embed timestamp in TreeView row for debugging diff --git a/quickitemdelegate.cpp b/quickitemdelegate.cpp --- a/quickitemdelegate.cpp +++ b/quickitemdelegate.cpp @@ -63,6 +63,19 @@ anchors.verticalCenter: parent.verticalCenter text: itemText } + + Text { + anchors.verticalCenter: parent.verticalCenter + color: "gray" + Timer { + interval: 1000 + running: true + repeat: true + onTriggered: { + parent.text = Qt.formatDateTime(new Date(), "yyyy-MM-dd hh:mm:ss"); + } + } + } } )"), QUrl()); // TODO