Found an undocumented Button class, but don't know how to trigger a function call

I need a few buttons in my gui dialog, and although I didn’t find a button in the documentation, I did find a Button class just by trying new Button(). I’m trying to figure out how to run a function when it’s pressed, but I’m having trouble. It seems to have something to do with Button.clicked.connect, but I can’t figure out how to use it.

Passing in:

myButton.clicked.connect(this, myFunction);

gets me an error: TypeError: Function.prototype.connect: SCRIPT_QSButton::clicked() is not a signal : line 398

Any help?

Found it. It’s documented in Harmony, but not in SBPro, despite the fact that it works in SBPro as well.

button.callback = “nameOfCallbackFunction”