Relation between core C++ Qt and its ECMAScript implementation

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
garciadelcastillo
Active Member
Posts: 28
Joined: Fri May 10, 2019 6:26 pm

Relation between core C++ Qt and its ECMAScript implementation

Post by garciadelcastillo » Wed Jun 05, 2019 3:02 pm

Hi there!

TL,DR: is there any documentation available about the ECMAScript bindings to Qt used for scripting on QCAD?

Description: I am curious if there is any documentation available about the JS-side API of the Qt C++ framework used for scripting. Qt looks quite powerful, and I like the idea of an ECMAScript-like API to access it. However, there are clear syntactical differences between the two languages, and it also looks like some of the core classes are not available JS-side (was trying to use QSet for example). Wondering if these issues are covered somewhere, or if there are dedicated ECMA docs about Qt.

Thanks!

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

Re: Relation between core C++ Qt and its ECMAScript implementation

Post by andrew » Thu Jun 06, 2019 8:43 am

The best way to discover the Qt ECMAScript API is probably through the vast number of example scripts in QCAD:
https://github.com/qcad/qcad/tree/master/scripts

Chances are there is already something similar to whatever you're trying to do.
Almost the entire Qt API is covered apart from container classes like QSet, QList, QMap which can be easily implemented in ECMAScript as object or array.

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”