I've done something along these lines with a HoloLens project to make a 3D Image widget behave like a toggle button. In my case, I just use the click action to call a function and that function is a toggle, depending on the viability of some item. So in the example below, I'm using gauge-1 to determine the visibility of the items, so I"m assuming they should all be the same.
You can not set a function to a property! The click is an event. But the setWidgetProp will set only properties. So you need to define it as listener.
The question is why do you want to perform such call. Another option is that you can use the UI event box to set the function. If you want to set some function dynamically to an element on run time. In this case you set in UI click event box for the function to app.myClickFunction();