
Originally Posted by
MarkoSan
Ok, so there is no way to handle this via signal/slot
Of course there is, I just pointing out that in this case it is unnecessary since it can be done much more elegantly using a property binding.
But if you insist on doing it the ugly way
Connections
{
target: ueApplicationStatus
onUeSignalDatabaseConnectionChanged:
{
state=(status===UeTypeDatabaseConnectionStatus.CONNECTED) ?
"ueStatusIndicatorDabaseConnected" : "ueStatusIndicatorDabaseNotConnected"
}
} // Connections
Connections
{
target: ueApplicationStatus
onUeSignalDatabaseConnectionChanged:
{
state=(status===UeTypeDatabaseConnectionStatus.CONNECTED) ?
"ueStatusIndicatorDabaseConnected" : "ueStatusIndicatorDabaseNotConnected"
}
} // Connections
To copy to clipboard, switch view to plain text mode
- you want to handle the signal of the ueApplicationStatus object (which has a nice property that you should be using instead)
- the syntax for the conditional assignment is:
condition ? valueIf : valueElse
condition ? valueIf : valueElse
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks