blob: fa1809aef0cf652ac8c81465c58881b2ca1e1819 (
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
|
import QtQml 2.0
QtObject {
property int x: 0
id: root;
Component.onCompleted: {
new Promise((res) => {
res(1)
})
.then((data) => {
console.debug(data)
return new Promise((res) => {res(2)});
})
.then((data) => {
console.debug(data)
return new Promise((res) => {res(3)});
})
.then((data) => {
console.debug(data);
root.x = 42;
});
}
}
|