Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.4.1
-
32a9015c8 (dev), e7bfadb78 (6.5), 362c3f6e9 (6.4)
Description
Consider:
#include <qqml.h> class CppObj : public QObject { Q_OBJECT QML_ELEMENT QML_SINGLETON Q_PROPERTY(QVariantList varList READ varList NOTIFY varListChanged) public: explicit CppObj(QObject *parent = nullptr) : QObject(parent) {} QVariantList varList() const { return {1.1, 2.2, 3.3}; } signals: void varListChanged(); };
import QtQuick import QtQuick.Shapes import MyTest Window { width: 640 height: 480 visible: true ShapePath { id: path dashPattern: CppObj.varList } Component.onCompleted: { console.log("Source list:", CppObj.varList) console.log("Target list:", path.dashPattern) } }
This works in 6.3 and earlier, but breaks in 6.4. The error message is:
qrc:/MyTest/main.qml:12:3: Unable to assign QVariantList to QList<double>