Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5
-
None
-
c09e2d91989fec4455fa3bbd23bbd4bed6a01d77
Description
This code works when using qt_add_executable and resources (qtbug113808-old.zip), but not qt_add_qml_module (qtbug113808-new.zip
):
import QtQuick import QtQuick.Controls.Fusion ApplicationWindow { id: root width: 640 height: 480 visible: true title: Qt.formatTime(root.time, "hh") property var time: new Date(1970, 1, 1, 0, 0) }
The fact that this doesn't work blocks https://codereview.qt-project.org/c/qt/qtdeclarative/+/470153 and https://codereview.qt-project.org/c/qt/qtdeclarative/+/470154 from being merged to 6.5.
https://doc.qt.io/qt-6/qml-qtqml-qt.html#formatTime-method says:
The time parameter may be a JavaScript Date object, a QTime, or QDateTime value.
In dev, the example works: https://codereview.qt-project.org/c/qt/qtdeclarative/+/470154/1#message-df1b6f66bfa4a02d08a49880841ba3b5b56ebedf