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
* support a few more QVariant + QJSValue functions
* support for QWebEngineProfile + QJSValueIterator
* docker deployments now automatically uses the pinned tooling version for projects making use of go modules
* bump Go version for docker images to 1.13.4
* various fixes for js/wasm ([]byte support, quickcompiler support, moc fixes)
* docker go modules support
* android arm64 support
* hide rarely used dependencies behind build flags
* various minor fixes
* js/wasm GOCACHE fix for Go 1.12+
* make use of the official Go 1.12 wasm build and replace js.NewCallback with js.FuncOf
* update docker images to Go 1.12.4
* revive raspberry images
* fix raspberry related bundling issue
* add the multimedia module to the raspberry images
* fix raspberry related QT_API issue
* remove unecessary *char to []byte copy overhead in some unlikely cases
* fix Qt install script
* initial partially support for Felgo (former V-Play) on darwin
* fix charts/audio example and darwin
* fix common/widgets_demo example on iOS (issue #451)
* fix widgets/renderer memory leak
* fix possible QT_PKG_CONFIG + QT_VERSION race condition
* fix static linux docker image
these changes should make the life of all newly incoming developers (or consumers of applications build with this binding) way easier
all one needs to do now is to install Git, Go and an C/C++ compiler then the binding can be setup by running:
go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup
or if one is only interested in building a specific application:
go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtdeploy test desktop github.com/therecipe/examples/basic/widgets
for this to work, the tooling now recognizes a pkg path and "go gets" the package if necessary
beside these changes, the deployed binaries are now properly stripped on linux and console debugging is now enabled by default on windows
recursive dependency resolution for qtrcc
fix ci qtmoc issue
support for fluid + demo
support for kirigami + demo
init files for c++ modules
new webkit 5.8.0 *.index file
The cgo files are now generated by parsing the Makefiles generated by
qmake.
This greatly simplifies the support for additional targets, and also
removes the need to maintain extra backward and forward compatibility
code.
But these (backend) changes needed to come along with some breaking
changes to the (fontend) tooling.
So there is now the need to always specify the target when you use
qtmoc, qtrcc or qtminimal.
Some other minor breaking changes were:
The moc and rcc files are not automatically removed anymore by qtdeploy.
Because qtdeploy now has a -fast flag to make used of these cached
files.
The use of docker is now specified by using the -docker flag.
And the docker images were renamed to make their use case more clear.
1. the qt api changed in various places
2. dropped the "_minimal" suffix for the deployment folders
3. to keep using older versions of Qt (5.7.1 for example), one would
now need to explicit export "QT_VERSION=5.7.1" and also
"QT_DIR=/path/to/Qt5.7.1"