Qml library for asynchronous programming
Parameter interval
- miliseconds
In generators:
yield Async.delay(2000)
In Qml
Delay{
id: delay
interval: 2000
}
Create Condition
directly in generator
function*(){
yield Async.condition(()=>checkbox.checked)
console.log("checkbox checked")
}
or create qml object Condition
and await yield
it in generator
Condition{
id: condition
predicate: checkbox.checked
}
function*(){
yield condition
console.log("checkbox checked")
}
predicate
may be property
or function
with enclosed properties
Condition{
predicate: function(){
return checkbox.checked && checkbox2.checked
}
}