Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0
-
None
-
tested only in Windows desktop
-
312604c85b1e6a6fc6de505bac86848936f81edd
Description
Let's assume we want to use the Button component in an application as:
Button.qml: Item { property string text: "A" Component.onCompleted: { console.log( "Button::onCompleted " + text ) } } MyApp.qml: Window { Button { text: "B" } }
This prints out "B" as expected. But when I change the property initialization in button.qml to
property string text: {"A"} // or property string text: getInitialValue() // which returns "A"
Expected initial value is "B" in all cases. This is very concrete example in QML components when the initial value is fetched from platform theme or from localization data.