Page 1 of 1

di.setSnapRestriction (new RRestrictVertical (di));

Posted: Tue Sep 24, 2019 7:28 am
by pietro_72_
With
di.setSnapRestriction (new RRestrictVertical (di));
I am prevented from moving vertically, but the button remains deactivated
Is it also possible to press the button via script?

Re: di.setSnapRestriction (new RRestrictVertical (di));

Posted: Tue Sep 24, 2019 8:05 am
by andrew

Code: Select all

var guiAction = RGuiAction.getByScriptFile("scripts/Snap/RestrictVertical/RestrictVertical.js");
guiAction.slotTrigger();
guiAction is of type RGuiAction which is derived from QAction (Qt).