Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.1
-
None
-
935087ea155e3c7437a991204818ca9a81c3fa17
Description
Run code below, dynamic qsTr string doesn't accept formatted date time string as an argument.
import QtQuick 1.0 Rectangle { width: 300; height: 200 Column { anchors.centerIn: parent Text { text: { var date = new Date(); return qsTr("This works, date %0").arg(Qt.formatDateTime(date, "hh::mm") + " "); } } Text { text: { var date = new Date(); // returns empty string return qsTr("This doesn't, date %0").arg(Qt.formatDateTime(date, "hh::mm")); } } } }