I'm still trying to connect a QToolButton (inside a widget) to a script (see first question at viewtopic.php?f=30&t=3187 which was not solved because I changed the complete concept after understanding the answer to my former second question - now having the same problem again). The following code works:
Code: Select all
widgets["addTrack"]["clicked()"].connect(this, function() { /* do something somewhere else! */ });
So I tried
Code: Select all
var button = formWidget.findChild("addTrack");
button.setDefaultAction(RGuiAction.getByScriptFile("scripts/QCTrack/TrackWidgetInsert/TrackWidgetInsert.js"));
Surprisingly
Code: Select all
var button = formWidget.findChild("addTrack");
button.setDefaultAction(RGuiAction.getByScriptFile("scripts/Block/InsertBlock/InsertBlock.js"));
I'm sorry for asking questions like that, but I can't see any difference. Can you help me out? Is there something that needs to be done inside the script that should be connected?
Thanks in advance,
Stefan