Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4.1
-
None
Description
Bindings on properties of type QQmlScriptString cannot be compiled to C++ because they are untyped. We need a solution that involves a typed property there. The following snippet of QML produces warnings when compiled to C++:
import QtQuick Window { id: root width: 640 height: 480 visible: true title: "Foo" Text { id: label states: [ State { when: true AnchorChanges { target: item anchors.top: label.bottom } } ] anchors.top: parent.top } Item { id: item } }
The warning:
Warning: main.qml:18:33: Cannot assign binding of type QQuickAnchorLine to QQmlScriptString
anchors.top: label.bottom
^^^^^^^^^^^^
Error: main.qml:18:45: Could not compile binding for top: cannot convert from QQuickAnchorLine of QQuickItem::bottom with type QQuickAnchorLine to QQmlScriptString of QQmlScriptString
Attachments
Issue Links
- resulted from
-
QTBUG-108851 qmlsc pastes whole file to stderr
- Closed