8 ms·
Qt Binding for Go with Support Desktop, Mobile and Embeddable
- xeeeeeeeeeeenu 7y agoI'm curious whether those bindings were written entirely by hand or perhaps some generator was used.
- donatj 7y agoI was wondering the same thing. Seems like a massive undertaking by hand.
- linux2647 7y agoI've never seen Qt run in a web browser. It's weird but cool
- w3clan 7y agoThat's WebAssembly there
- derefr 7y agoIt looks like this binding has a compile option where Qt itself is statically linked into the resulting executable. That gives this stack (Go+Qt) a very unique deployment story. There are a lot of people (I'm looking at you, console home-brew community) who build all their little tools to go along with their projects as native GUIs, usually with C# + WinForms—not particularly because they have Windows-specific functionality, but more because they have at least some native functionality (so Electron is out) and C#+WinForms allows them to just make releases as a standalone .exe you can "just" download and run (at least on modern Windows), without needing to first install some external runtime. This could be a good multiplatform alternative to the C#+WinForms stack, with all the same advantages. (The only con being that statically-linked Qt is pretty dang large.)
- htfy96 7y agoOne thing to notice is that the open-sourced version of Qt is under GPL/LGPL, which means if you statically linked it into the executable, your application is then infected by (L)GPL.
- kej 7y agoYour application is "infected" if you use Qt without a commercial license, regardless of how you link it. It's a little harder (but still possible) to comply with the LGPL requirements when you statically link, but you are bound to those requirements either way.
- therockhead 7y agoI believe the parent post is correct and mechanism used to link effects the licence.
- groovebits 7y agoPretty sure having it dynamically linked is ok with the open source licence
- kej 7y agoRight, my point is that static linking is also okay with the LGPL, albeit slightly more difficult in terms of what you have to make available to end users.
- nickserv 7y agoIf you want to ship closed source code based on other people's hard work, then you should pay. In this case by getting a Qt commercial license.
- MayeulC 7y agoWell, you can do this with C++ and Qt as well, but as a sibling commented, you are subjected to LGPL, so your app has to be under a compatible license, or provide a way to replace the Qt part (not sure if you were to provide one such mechanism while statically linking, like SDL2 does with its dynapi[1]). [1]: https://hg.libsdl.org/SDL/file/default/docs/README-dynapi.md https://hg.libsdl.org/SDL/file/default/docs/README-dynapi.md
- mappu 7y agoWe ship a C++/Qt/Go application at $DAYJOB. The C++ and Go parts communicate by IPC so I would love to get down to a single language - Qt is the main reason why C++ is involved at all. A Go binding for Qt (Widgets) would seriously solve a lot of issues for us. But this binding is LGPL, so - we can't include it in a closed-source statically-linked Go application as-is; - this binding plans to offer a commercial license but it isn't available yet; - dynamic linking of a Go package (i.e. `-buildmode plugin`) is possible on Linux but not on Windows. There's also the similar https://github.com/kitech/qt.go https://github.com/kitech/qt.go that works by LoadLibrary/dlsym'ing the Qt dll/so files, that has the same LGPL + no-commercial-alternative license.
- ddevault 7y agoThis seems more like a feature than a bug. Shipping proprietary software to end-users is unethical. The license is working as designed.
- fithisux 7y agoAgreed
- tonyedgecombe 7y agoShipping proprietary software to end-users is unethical. The user wants to use the software, the developer wants to provide it. I'm really struggling to see what is unethical about that.
- rudilee 7y agoMaybe what he means is that it's unethical to provide software to user without access to the source code, so in case the developer go out of business the user is left with software that the user couldn't update by themselves or someone else they hired.
- jcelerier 7y agoYou can statically link LGPL.
- cjensen 7y agoThe license looks like a mess. They claim their own code is LGPL, but it looks like some of their code links to GPL modules (e.g. serialbus). To my mind, this is entirely GPL and heaven help anyone who mistakes it for LGPL.
- api 7y agoThis is much more basic but also considerably smaller. https://github.com/andlabs/ui https://github.com/andlabs/ui I really wish libui had more support and momentum. It's literally the only sane cross platform UI project in existence. Everything else is not native (html5 guis), has no accessibility support (all the immediate mode ones), is ancient and ugly (wxwidgets), or is bloated (qt).
- cryo 7y agoIs andlabs/ui still maintained? The last commit is from September 2018. Personally I love Qt since it's modular and I only use (and ship) the parts needed by the application. It exists since 1995 and is still heavily maintained and modernized over time. I don't know any other GUI cross-platform library like that.
- fithisux 7y agoThis is maintained. libui is the parent project.
- api 7y agoIt's maintained, but by one dev in their spare time as near as I can tell. The parent libui project is in the midst of a refactoring. We're considering using it for some simple client UI stuff and if we do we plan to make a donation. This would take a lot of work to be powerful enough for a complex rich UI, but the world needs a basic cross platform UI lib for doing simple interfaces. It's absurd for things like file sync clients and VPN clients to spin up f'ing Electron to provide a UI, but they often do.
- _pmf_ 7y agoI predict that we will see a renaissance of CORBA / COM MIDL in the form of WebAPI IDL as new IPC standard, bringing interoperability back to where it was around 1995.