Is there a way to emit or is there a signal that is emitted at the start of an application in qml?
My purpose is to check wether some values are in a list and when, then I want to enable a button.
Something like:
Rectangle{ id:main
Button {
id:myButton
checkable: false
onClicked: { /* do something */ }
}
// First variant
Connections: {
target: myClass
onSignalEmit() { myButton.checkable = true }
}
// Second varinat
emit startUp()
}
As @Retired Ninja said you can use Component.onCompleted in this case
Rectangle{
id:main
....
Component.onCompleted: startUp();
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments