
Qt Binding for Go with Support Desktop, Mobile and Embeddable - w3clan
https://github.com/therecipe/qt
======
derefr
It 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
One 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
Your 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.

~~~
groovebits
Pretty sure having it dynamically linked is ok with the open source licence

~~~
kej
Right, 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.

------
mappu
We 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
This seems more like a feature than a bug. Shipping proprietary software to
end-users is unethical. The license is working as designed.

~~~
tonyedgecombe
_Shipping 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
Maybe 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.

------
api
This 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
Is 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.

~~~
api
It'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.

------
xeeeeeeeeeeenu
I'm curious whether those bindings were written entirely by hand or perhaps
some generator was used.

~~~
donatj
I was wondering the same thing. Seems like a massive undertaking by hand.

------
cjensen
The 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.

------
linux2647
I've never seen Qt run in a web browser. It's weird but cool

~~~
w3clan
That's WebAssembly there

------
_pmf_
I 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.

