0
我有日期線數字,我如何將這些數字轉換爲qml中的時間字符串?這是我所嘗試過的,但得到了錯誤,committedDate是int數,它持有從紀元開始的毫秒數。將QML中的dateline數字轉換爲時間字符串
Text {
id: timeText
anchors.centerIn: parent
text: Date(committedDate).toTimeString()
color: "white"
}
誤差
qrc:/Conversation.qml:1940: TypeError: Property 'toTimeString' of object Sun Dec 25 11:08:45 2016 GMT+0330 is not a function