Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
5.0.0
-
None
Description
Alias properties aren't being resolved correctly, which can result in property assignment failures and symbol resolution errors.
The resolution can be forced by evaluating an expression which resolves the alias property, prior to performing an assignment, but this shouldn't be necessary.
main.qml
import QtQuick 2.0 ComplexButton { background.color: "#fff000" Component.onCompleted: { console.log("main.qml.onCompleted: " + background.color.toString()); } }
ComplexButton.qml
import QtQuick 2.0 Item { property alias background: backgroundImg // No error. //Rectangle { // id: backgroundImg // color: "red" //} // Error: main.qml:4:16: Cannot assign to non-existent property "color" Image { id: backgroundImg property color color: "red" } Component.onCompleted: console.log("ComplexButton.qml.onCompleted: " + backgroundImg.color.toString()) }
Attachments
Issue Links
- relates to
-
QTBUG-15269 Need way to define grouped properties in QML
-
- Closed
-