di.setSnapRestriction (new RRestrictVertical (di));

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Post Reply
Full Member
Posts: 77
Joined: Fri Apr 17, 2015 6:40 am
Location: http://creativitainformaticart.altervista.org

di.setSnapRestriction (new RRestrictVertical (di));

Post by pietro_72_ » Tue Sep 24, 2019 7:28 am

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?

User avatar
Site Admin
Posts: 7019
Joined: Fri Mar 30, 2007 6:07 am

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

Post by andrew » Tue Sep 24, 2019 8:05 am

Code: Select all

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

Post Reply

Return to “QCAD Developers and Contributors”