Commit graph

25 commits

Author SHA1 Message Date
therecipe
3738bb9320 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
2019-11-17 18:05:18 +01:00
therecipe
7a4e353ce4 re-add missing QMetaObject class 2019-08-20 17:50:05 +02:00
therecipe
9e0d301216 breaking changes: bump default Qt version to 5.13.0
* fixes for Go 1.13 + retain go module 1.12 GOPATH behavior for internal/examples
* update docker images to 5.13.0
* new docker images (windows_64_shared_512, linux_512, darwin_512)
* update examples to match the Qt 5.13 api
* bump android minSdkVersion to 21 (5.0 / lollipop)
* bump OpenSSL version for android docker deployments to 1.1.1a
* let the binding use the 513 env by default

you can use QT_VERSION=5.12.0 and/or QT_API=5.12.0 to keep the binding backward compatible with your code
just setting QT_API=5.12.0 alone should also be sufficient to keep docker deployments working
if you did install an official Qt version then just set the correct QT_VERSION and procede as usual
2019-06-27 22:16:04 +02:00
therecipe
eedf008a49 fix []string issue + fix docker images + add fcitx plugin to linux images 2019-05-23 00:17:16 +02:00
therecipe
5746a84fb2 support for Qt 5.12
* use clang for android builds
* official windows builds are 64 bit now
2018-12-17 01:52:29 +01:00
therecipe
5355937d17 more fixes for 5.11.1 + split js image again + fix sailfish image 2018-06-26 17:34:11 +02:00
therecipe
299f21022a cgo fix for Go 1.10 + fixes for various memory leaks + fix homebrew support 2018-03-19 20:54:58 +01:00
therecipe
a76e708146 update to Qt 5.10.0 + support for Go 1.10 2018-01-17 20:38:03 +01:00
therecipe
9b0ed9da10 constructor support for objects instantiated in qml 2017-05-31 15:05:10 +02:00
therecipe
d0787d4a4d support for android-emulator + minor qtmoc fix 2017-04-17 19:21:21 +02:00
Kenneth Shaw
567a430704 Dropping exec permissions on files 2017-04-12 15:21:13 +07:00
therecipe
1c2fcd441f breaking changes; make use of qmake + drop legacy code
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.
2017-03-16 20:18:32 +01:00
therecipe
177d16c013 new webview module + example + more subnamespace functions 2017-02-17 18:55:39 +01:00
therecipe
9cb2c840ec initial update to Qt 5.8 + breaking changes + new speech module
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"
2017-02-10 18:18:44 +01:00
therecipe
580d22b6fb initial support for qtmoc constructors + new androidextras exception functions 2017-01-22 18:34:39 +01:00
therecipe
aa03aa56d5 cleanup + refactor 2017-01-18 19:28:40 +01:00
therecipe
6f05f39db9 minor cleanup 2017-01-14 00:36:20 +01:00
therecipe
a38697d6be support the readData function 2017-01-11 16:18:44 +01:00
therecipe
7bcd38cd53 fix signal table cleanup 2016-08-26 15:33:11 +02:00
therecipe
57465bf582 fix memory leaks + more primitives + cleanup 2016-08-23 22:51:01 +02:00
therecipe
1693c8079c fix memory leaks + new example 2016-08-19 23:20:42 +02:00
therecipe
5135ca6e12 update to qt 5.7.0 + new modules 2016-06-16 17:49:55 +02:00
therecipe
c0571eec4e cleanup and support for abstract classes 2016-04-28 19:43:44 +02:00
therecipe
3bc511e9d1 fix minor android issues 2016-01-26 17:58:25 +01:00
therecipe
f254a2b93a merged *.go files, include guards for *.h files, minor fixes 2016-01-08 02:44:20 +01:00
Renamed from androidextras/qandroidjniobject.go (Browse further)