HNHacker News
TopNewBestAskShowJobs

therecipe

207 karma · joined November 11, 2016

submissionscomments
therecipe··on Show HN: Fully Featured Qt Binding for JavaScript
repo link: https://github.com/therecipe/entry
therecipe··on Show HN: Write Qt for WebAssembly Applications Entirely in Go And/or JavaScript
If you are on mobile, here is the direct link to the repo: https://github.com/therecipe/widgets_playground Sorry, the widgets playground isn't really meant to be used on mobile devices. The next playground will be made with QML instead and should be better suited for mobile usage.
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
I think you can't simply reuse the rpi3 env, but you can use it as a template to how to get this working for the beaglebone black. So you would need to get a cross compiler and then extract the sysroot to compile Qt on your own. After you got Qt compiled, you will also need to make some changes similar to these [1] But I think the hardest part might be to get Qt compiled for the beaglebone black, because the info I found online seems to be a bit outdated.

https://github.com/therecipe/qt/pull/226/files

therecipe··on Show HN: Qt binding for Go with support for all major operating systems
It could probably work, but plugins currently only work on linux.
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
The file size depends on the target and what modules you use, for dynamically linked projects I would guess it's around 50mb for an average project. Maybe 20mb more on windows because of the icu libs, but those can be replaced with your own (much smaller) versions. Static projects may weight half of what the dynamic ones do, so maybe around 25mb. But depending on how much you care about file size, you could also compile your own static Qt version and then strip everything that you don't need.

Here [1] are some infos about QML development and here [2] you can try out QML in the browser.

[1] https://github.com/Esri/arcgis-appstudio-samples/wiki/Unders... [2] https://qmlweb.github.io

therecipe··on Show HN: Qt binding for Go with support for all major operating systems
thank you :)
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
It depends on how much you want to embrace docker. In general you can use this binding without touching docker at all. But if you want, you can use docker in every step of the process. It starts with the minimal setup that just depends on Go + Docker. Then continues during development, so if you would want for example test your application on android really quick, then you would just need to pull the android image instead of setting up the android SDK, NDK and JDK by yourself. And then in the end you can use docker for your CI and CD processes as well. For example by creating your own docker images on top of provided ones.
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
:)
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
go-qml, like the name suggests allows you to use QML together with Go. This binding allows you to also use Qt's C++ API. And it contains some tools to simplify deployment and development processes.
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
If Qt supports it, then you can probably get it working with this binding as well.
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
yes, the .cpp .h and *.go files are all generated
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
it's in the internal package: https://github.com/therecipe/qt/tree/master/internal/binding
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
no
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
qtdeploy is intended to be used for deploying and therefore will run qtrcc, qtmoc, qtminimal and do the actual bundling of your binary. the -fast flag re-uses the cached rcc_* moc_* minimal-* files and will also not re-run the actual bundling process. this works for the desktop targets but not for the mobile targets, therefore I made it optional.
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
thank you :)
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
it's automatically generated against the Qt version you use when you run the setup. the generator is also used to power qtmoc and qtminimal.
therecipe··on Show HN: Qt binding for Go with support for all major operating systems
it depends on the target [1] and which Qt version you use, the default "official" Qt version usually dynamically links against Qt's libs. for windows for example you can use the msys2 version (on windows), which can also be statically linked or you could use the docker images with mxe to statically link your windows application. but you could also build a static version of Qt yourself and use that version as well.

https://github.com/therecipe/qt#targets

therecipe··on A Simple Rust GUI with QML
shameless plug for my Go binding: https://github.com/therecipe/qt it's still WIP though
therecipe··on Qt binding for Go with support for all major operating systems
Mh, usually the minimal_cgo_* files and the cgo_* files should use the same imports.

But the qtsetup won't always re-generate these cgo_* files if the QT_DIR is up to date (there is probably a bug if you use QT_PKG_CONFIG).

So I would use `qtminimal` or `qtdeploy` for debugging this, because the minimal_cgo_* files are always re-generate.

And you may also want to change `InfoLevel` in `internal/utils/logger.go` to `DebugLevel` and then re-build the cmd/tools to get additional infos.

Hope this helps :)

therecipe··on Qt binding for Go with support for all major operating systems
Did you tried to use QT_MISC_DIR (which should contains the "mkspecs" subfolder) and QT_DOC_DIR, which should contain for example (QtCore/qtcore.index)? Or if you like, open an issue on github and we can try to sort this out :) edit: also if you use PKG_CONFIG=true, the QT_DIR will be ignored
therecipe··on Qt binding for Go with support for all major operating systems
I don't know as what you define free. But Qt is as far as I know is available under LGPL, GPL and under a commercial license. Also they co-operate with the KDE project and made sure that it will stay "free" IIRC.
therecipe··on Qt binding for Go with support for all major operating systems
Thank you :)

I should probably mention that Option 1 is still depending on all the system/dynamic libs. And therefore only usefull to save time during development or if you need more control about the build. If you want to get a smaller binary, run `qtminimal` and `go build/run -tags=minimal` to include only the necessary C++ code, but the binary will still depend on the dynamic/system libs. I will add full statically linking in the future, but probably only after Qt 5.8 is released.

therecipe··on Qt binding for Go with support for all major operating systems
author here; The size depends on your platform and the way you build it. If you used `qtdeploy` instead of `go run/build`, you should get a 2mb binary which includes Go's runtime + only the needed Qt C++ code. (A normal go binary has the size of 1.5mb or so) The rest are Qt dynamic libs, which are not all needed, depending on what you build. You can safely remove plugins and maybe whole modules. edit: and you can also compile Qt on your own to strip out ICU and other unnecessary stuff + with Qt 5.8 things will get even more lightweight.
therecipe··on Qt binding for Go with support for all major operating systems
author here; Using Docker saved me from creating the code to cross compile from windows->linux, darwin->linux/windows, ... And this alone was worth it, but being able to ship something that works out of the box is nice a nice bonus :) edit: I'm also planning to create macOS and iOS target images.
therecipe··on Qt binding for Go with support for all major operating systems
Thank you very much :)
therecipe··on Qt binding for Go with support for all major operating systems
author here; Thank you :)
therecipe··on Qt binding for Go with support for all major operating systems
author here; Yes, as well as material design and all the stuff that comes with QML/Qt Quick.
therecipe··on Qt binding for Go with support for all major operating systems
author here; Yes, those look awful. But only because it's build with Qt's C++ widgets (intended for desktop development) and not with the recommended Qt Quick Controls. I will update the screenshots to something that is build with QML.
therecipe··on Qt binding for Go with support for all major operating systems
author here; Because I used the C++ widgets, which are not intended to be used on mobile platforms. The proper way to develop mobile apps is in QML/Qt Quick, and those would look great. You can style them any way you want, and there are also material (google) and universal (microsoft) themes that can be easily plugged in.
therecipe··on Qt binding for Go with support for all major operating systems
author here; Yes, you can create derived classes from any class that is derived from QObject. Simple anonymously subclass in Go and add your own slots/signals, as shown in the "quick/bridge" and several other examples. Then run "qtmoc" to generate the need c++ and go code. All functions usually accept interfaces and all classes have their corresponding interface, which itself inherits all the derived interfaces.
Page 1 of 2Next →