Scripts, missing icon

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

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
User avatar
Q_RIS
Newbie Member
Posts: 5
Joined: Thu Jun 11, 2020 1:36 pm
Location: Austria

Scripts, missing icon

Post by Q_RIS » Thu Jun 11, 2020 2:01 pm

QCAD Professional 3.24.3.0(Portable) Win7

Hi there, well, my first post here,
so, first things first,thank you guys for this amazing piece of software!
I'm tempted to try to create some modification tools in the future, so here I am.
Its been a while since i did program a little bit in C#, so I deceided to start from scratch with this tutorial:
https://www.qcad.org/doc/qcad/latest/de ... _bars.html
Its great that you made it possible to script own tools, but I got stuck a bit:
I changed the last line in "MyAction.js" from

Code: Select all

action.setWidgetNames(["MyScriptsMenu"]);
to

Code: Select all

action.setWidgetNames(["MyScriptsMenu", "MyScriptsToolBar"]);
in order to see the icon on the toolbar, the icon is visible in the menu but somehow
it doesn't appear on the MyScriptsToolbar... :?
I thought probably its unticked in the Preferences General Tool Settings, but it is ticked.
If someone could gimme a hint what I'm missing here'd be awesome!
Thanks!

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

Re: Scripts, missing icon

Post by andrew » Thu Jun 11, 2020 2:58 pm

Please change the name of the toolbar in MyScripts.js / MyScripts.getToolBar() to "MyScriptsToolBar". I've also changed that in the online doc for consistency.

User avatar
Q_RIS
Newbie Member
Posts: 5
Joined: Thu Jun 11, 2020 1:36 pm
Location: Austria

Re: Scripts, missing icon

Post by Q_RIS » Thu Jun 11, 2020 4:53 pm

Image
I guess I would never had found that...
Image

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”