Now the source is both set declaratively on bgimage and imperatively on this handler. How about just using BordegImage { [...] source: parent.pressed ? "..." : "..."?