Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qcad/qtjsapi
QJSEngine bindings for the Qt 6 API
https://github.com/qcad/qtjsapi
Last synced: 2 months ago
JSON representation
QJSEngine bindings for the Qt 6 API
- Host: GitHub
- URL: https://github.com/qcad/qtjsapi
- Owner: qcad
- License: mit
- Created: 2023-09-21T12:39:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-23T20:20:51.000Z (3 months ago)
- Last Synced: 2024-10-24T07:56:33.344Z (3 months ago)
- Language: C++
- Homepage:
- Size: 9.53 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
QtJSAPI
=======QJSEngine bindings for the Qt API
QtJSAPI replaces the Qt Script based [qtscriptgenerator](https://github.com/qt-labs/qtscriptgenerator)
for Qt 5 which was made obsolete when the Qt Script module was declared deprecated.
QtJSAPI has been tested with Qt 6.5.License
-------
MIT License.
See [LICENSE.txt](https://github.com/qcad/qtjsapi/blob/main/LICENSE.txt).Build
-----
```
cmake -G Ninja .
ninja
```Usage
-----
```
// create QJSEngine
QJSEngine* engine = new QJSEngine();
// make Qt API classes scriptable:
RJSApi* rjsapi = new RJSApi(engine);
// usage example:
engine->evaluate("var w = new QWidget(); w.show();");
```Examples
--------
The library comes with a console application that evaluates a script passed to it on the command line.
You can run the examples as follows:
```
./out/qtjsapiconsole console/examples/HelloWorld/HelloWorld.js
```