Details
-
Technical task
-
Resolution: Unresolved
-
P2: Important
-
None
Description
Consider:
import QtQuick import QtQuick.Window Window { id: root width: 640 height: 480 visible: true title: qsTr("Hello World") property color myColor: "orange" Text { text: root.myColor } }
qmllint says:
Warning: /home/ulf/untitled1/main.qml:14:15: Cannot assign binding of type QColor to QString [incompatible-type] text: root.myColor ^^^^^^^^^^^^
It should be possible to coerce QColor (or any value type for that matter) to QString. QQuickColorValueType has an invokable toString() method. Such a method should be used for string coercion. If it's not available, the result should be some '[object Object]', ie the same thing the engine does.
Attachments
Issue Links
- resulted from
-
QTBUG-117797 qmllint doesn't understand QColor
- Closed