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!
Relation between core C++ Qt and its ECMAScript implementation
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Active Member
- Posts: 28
- Joined: Fri May 10, 2019 6:26 pm
Re: Relation between core C++ Qt and its ECMAScript implementation
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.
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.