blob: 21a3e78da88afc411d4fad64264edbb0581c791c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import QtQuick 2.0
import Qt.test 1.0
MyQmlObject {
id: root
property bool test: false
qjsvalue: new vehicle(8);
property int wheelCount: qjsvalue.wheels
function vehicle(wheels) {
this.wheels = wheels;
}
Component.onCompleted: {
if (wheelCount != 8) return;
// not bindable, but wheelCount will update because truck itself changed.
qjsvalue = new vehicle(12);
if (wheelCount != 12) return;
test = true;
}
}
|