Skip to content

noflipflops/QmlAsync

Repository files navigation

QmlAsync

Qml library for asynchronous programming

Warning!! Work in progress. Not for production use.

Types

Task


Fetch


Delay

Parameter interval - miliseconds

In generators:

yield Async.delay(2000)

In Qml

Delay{
    id: delay
    interval: 2000
}

Condition

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
    }
}

Releases

No releases published

Packages

No packages published

Languages