-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
greatly extend the Go <-> Qml/JS interoperability
These changes introduce two new functions called (*qml.QJSEngine).NewGoType and (*qml.QJSEngine).ToGoType, that can be used (similiar to how core.NewQVariant1 and (*core.QVariant).ToGoType can be used) to convert Go objects and functions to *qml.QJSValues and vice versa. This allows for a more natural communication between Go and Qml/JS and makes it possible to simply pass a Go structs to Qml/JS and then call Go methods on that object. For this to work, the object passed to Qml/JS needs to implement the `Pointer() unsafe.Pointer` and `SetPointer(unsafe.Pointer)` functions atm. Which means, since all Qt classes already implement these functions, that you can now use the whole binding from Qml/JS as well and theoretically create a full Qt application inside an QJSEngine as well. A few example applications almost entirely written in JS can be found here: https://github.com/therecipe/examples/tree/master/js/ Furthermore, the `widgets_playground` example (https://github.com/therecipe/widgets_playground) now fully works on desktop and mobile targets as well. other changes: * core.NewQVariant1 and (*core.QVariant).ToGoType now recognize json tags * workaround for qtmoc issue related to named imports * speed-up go module android docker deployments * fix webengine related qtdeploy bug on macOS * fix int overflow issue for arm docker images * fix js docker images
- Loading branch information
Showing
66 changed files
with
14,846 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.