I want to create a custom QML component with two properties one
and two
, which should have default values when left uninitialized. In particular, if two
should get an initial value depeding on one
. The following code
Rectangle {
property int one: 1
property int two: 2 * one
}
however creates a property binding: Whenever one
changes, two
is updated to the new value of 2 * one
. How can I initialize two
to the value of 2 * one
without creating a binding?