
C++ UI Libraries - pplonski86
https://philippegroarke.com/posts/2018/c++_ui_solutions/
======
klodolph
> Dear ImGui

> Cons

> nothing jumps out to me

Why the _fuck_ am I reading this article? I could easily write "nothing jumps
out to me" or list a bunch of first-impressions of GUI libraries. But I can
tell you off-hand a list of cons for Dear ImGui, and if you're interested
there are plenty of Qt -vs- ImGui comparisons out there based on people who
have actually switched and done a writeup. (Various people fall on both sides
of this debate.)

[https://deplinenoise.wordpress.com/2017/03/05/why-qt-and-
not...](https://deplinenoise.wordpress.com/2017/03/05/why-qt-and-not-imgui/)

[https://gist.github.com/bkaradzic/853fd21a15542e0ec96f726815...](https://gist.github.com/bkaradzic/853fd21a15542e0ec96f7268150f1b62)

There are definitely use cases out there where Dear ImGui is a clear winner
over Qt, and vice versa, and if you're going to compare GUI frameworks I would
expect to want to know more about them.

I have a big ole' bag of Google Docs that contain comparisons like this, but I
sure as hell ain't gonna share them because they're full of subjective
declarations and I stop evaluating an option as soon as I've figured out it
doesn't meet my needs.

~~~
felixguendling
I consent with you that many pros and cons are rather subjective and pros/cons
depend on the specific use case. On the other hand, I like having a list of
all these libraries with their supported platforms, license and a screenshot.
This alone gives a pretty good overview of what's there. Not all pros/cons are
subjective (e.g. having a GUI wysiwyg editor is definitely a pro for some use
cases). Anyway, thanks for sharing your view and thanks for sharing this
comprehensive overview.

~~~
seba_dos1
Even the list of platforms is kinda pointless here, as Dear ImGui doesn't
really support any platform itself. You're expected to write a glue yourself,
with some examples for popular libraries/frameworks/engines being provided for
your convenience (and those examples alone already go further than just four
platforms listed in the article).

On the other hand, Qt is a whole framework itself which already handles all
this stuff for you, which makes a lot of stuff easier, but then you're of
course limited to what's supported by Qt.

------
badsectoracula
> Cons: [...] I don’t like it

I found that reasoning funny for something like Qt that almost everyone knows,
but as i was reading on and on, i found myself asking "why" to many of those
cons (and some pros). I do not think this list is very useful really, it is
mainly a link dump and the descriptions also seem to be taken from the sites,
at least for the less popular ones. I'd prefer to see an actual review (even a
single paragraph, it would help explain why "IDE?" is both a pro and con for
U++) which go a bit more in detail than "ugly af" (which i disagree with, btw,
i like how Fox Toolkit looks) and "sourceforge" (wth is the problem with a
site's project being on sourceforge? It provides excellent tools for projects,
not everyone has to monoculture themselves on GitHub).

Also it is a bit wrong. Both Motif and WTL are not dead projects, Motif is
still getting updates (although it is mostly bugfixes) and WTL has new commits
often with the original developer at the helm.

------
eco
I'm a longtime user (15+ years) of wxWidgets in a commercial application. It's
served us well during that time but lately it's been feeling more and more
like our software looks outdated. Native UI is long touted as a pro but more
and more software is eschewing the native look to stand out. Even Microsoft
has been abandoning the win32 look in their win32 applications (Office, VS,
etc.).

I found the linked page a few months back and was disappointed that there was
no clear winner for someone that wants a nice, modern looking interface. JUCE
looked nice but is weirdly focused on the niche audio applications field (and
their website is so full of marketing copy it's hard to even get a feel for
what it's like to use and how things fit together).

I'm a fan of the concept of IM GUIs in general (though pure immediate mode UI
probably isn't appropriate for us for a variety of reasons) but Dear ImGui and
most of the others just don't do the right UI paradigms to fit an application
like ours (a thousand floating windows would drive our users insane).

We're at this weird place were game UI libraries look great (or can be made
to) but aren't appropriate for information dense commercial applications, the
available libraries designed for that use case look awful, and the big
companies that have great UIs aren't sharing them with anyone.

~~~
c-smile
> the big companies that have great UIs aren't sharing them with anyone.

Here are some "big companies"
[https://sciter.com/#customers](https://sciter.com/#customers) and the library
they use for their UIs.

~~~
13415
IMHO, only Evernote stands out in this list. Most of the other companies seem
to have trivial user interfaces requirements. The GUI for an antivirus product
could be built with just about any framework.

~~~
c-smile
"The GUI for an antivirus product could be built with just about any
framework"

Not "any" as Section 508 is mandatory for example.

That really limits your options to Qt and Sciter from that list (if to
consider style of their UI).

Qt is too large for them and not that convenient as they need. Yet DirectX
(hardware accelerated) rendering is the must for high-DPI support.

And check this: [https://sciter.com/from-skeuomorph-to-flat-ui-evolution-
of-o...](https://sciter.com/from-skeuomorph-to-flat-ui-evolution-of-one-
application/) . That is about 12 years of one application that is transitioned
from Skeumorphism to Metro style UI without changing native code of UI.

------
pier25
Desktop crossplatform development is a weird beast. Yeah you get to share a
lot of code between platforms and it's easy to get 80% there, but getting a
polished UI is a lot of work.

In some cases such as using JUCE for making audio plugins it's even desired to
not have a native UI since users expect each plugin to have its own UI. But
unless you are huge, like say Adobe, having a nice and polished cross platform
UI for application development is simply not feasible.

After years I've come to the conclusion that the proper way of supporting
multiple platforms is having native UIs and sharing application logic in any
way you can between platforms. I think that's the idea behind Xamarin.

~~~
inspector-g
Even Adobe has bungled its cross-platform UI support/tooling a number of
times. I think the reduced scope definitely helps though, but even in that
scenario some problems seem to unavoidably surface.

Source: have written plugins for Adobe products for many years.

~~~
pier25
What do you mean by "reduced scope"?

------
rapsey
It is unfortunate that the libui author very much insists on doing everything
himself instead of encouraging a more community oriented development approach.
The job is too big for any single person.

If that project was managed better it would be huge. Even by basically being
unusable it still has so much interest.

~~~
pault
Wait, what's stopping the community from helping out? It is open source,
right?

~~~
rapsey
Well if PR don’t get merged because the author plans on redoing that part of
the lib or does not fit with their “vission” that pretty effectively kills the
community help.

~~~
pault
True. I wonder how long that can continue before someone forks and takes the
contributors with them.

~~~
rapsey
It requires someone with knowledge of native gui toolkits on the three desktop
platforms. That is a pretty high requirement.

------
yakubin
Regarding GTK/gtkmm:

> \- building & linking is hell

Building GTK itself perhaps. I haven't tried that. However, to use it in an
application it appears that adding a couple lines to your CMakeLists.txt
suffices[1]. I've used GTK (in C) in the past and had no problems with the
"building the application" part.

> \- GNOME

An explanation for why you see GTK's association with GNOME as a con would be
appropriate.

> \- looks meh

How it looks, depends on the theme used. However, I do agree that it "looks
meh" with Adwaita (the currently default theme).

[1]
[https://wiki.gnome.org/Projects/gtkmm/UsingCMake](https://wiki.gnome.org/Projects/gtkmm/UsingCMake)

~~~
13415
In my opinion _Adwaita dark_ looks pretty good. Since I'm currently building a
Gtk3 app in Go, I'm very curious: Which theme would you prefer for a modern
desktop application?

~~~
yakubin
With GNOME I use Arc-Darker. With i3 I use Numix. I generally prefer Numix,
but for some reason it looks weird e.g. with nautilus.

------
timw4mail
wxWidgets seems to strike the best balance between documentation, activity,
and having native widgets.

It's also true that the API is weird, and some of the wrapped native APIS are
deprecated, or work weirdly with modern features.

Now if the qt branch for Linux was stable...

But really, C++ has so much choice compared to say, Rust.

~~~
badsectoracula
Yeah, of all the popular C++ tookits listed in the site, my personal
"favorite" is wxWidgets (favorite in quotes because i do not _really_ like it,
it is just the one i found myself being more comfortable with). We're using Qt
at my current job and while i'm ok with it, i still like working with
wxWidgets more than Qt (even if Qt is certainly more polished).

I found documentation fine with both toolkits, although i _really_ like that
wxWidgets's docs are in CHM format so i can quickly search and scan them
locally with a handy tree of contents at the side. With Qt i have to use the
online docs and searching goes through Google which slows things down
(...there might be some offline docs at the Qt site to download, but i
couldn't find it).

~~~
slezyr
Qt Assistant(Offline doc browser) comes with Qt. You can also use
Zeal(supports offline docs for JS/HTML/CSS/TS/Vue/..., OpenGL, Qt, and many
others)

~~~
badsectoracula
It does, but it doesn't contain the Qt documentation. It only has
documentation for itself.

It might be that _something_ is missing, i just cannot figure out what.

~~~
detaro
If you install Qt through the installer (which would be the main way of
getting it on Windows), your installation should have a "Docs" folder
containing HTML files.

Many Linux distros package it separately, e.g. on OpenSuSE it's in
"libqt5-qtdoc" and its subpackages.

~~~
badsectoracula
I didn't installed Qt myself, it is part of the repository (gamedev, we put
_everything_ in the repository :-P). Perhaps i'll try to install the same
version of Qt somewhere separately and see if the docs are there.

------
slezyr
> Qt

> feature creep, the project

> uses ancient paradigms

> tends to overtake all your structures

> slow

> I don’t like it

Seriously?...

~~~
ahartmetz
I might be a wee bit biased because I work with Qt, but seriously, its
breadth, quality, and documentation are why it's the quasi-standard for cross-
platform UI programming. There is currently a discussion about the ownership
model (I guess that is meant with "ancient paradigms") on the development
mailing list. The ownership model isn't really among the top n problems during
typical development in any case. There is also QML which is an extremely
productive way to create hardware accelerated touch-friendly UIs. QML is
widely used in embedded systems.

~~~
pier25
Can you point out some big desktop projects made with QT that run on macOS
and/or Windows?

~~~
tpush
The Dolphin emulator [0] and Krita [1] are two that come to my mind.

[0] [https://dolphin-emu.org](https://dolphin-emu.org)

[1] [https://krita.org/en/](https://krita.org/en/)

~~~
favorited
Dolphin just switched to it, too. They were on wxWidgets until recently.

------
mindviews
While lacking in lots of built-in UI widgets, I use Cinder like a UI library.
[https://libcinder.org/](https://libcinder.org/) Perhaps "graphics library"
would be a better descriptor and explains why I didn't find it on the list.
But with mouse/touch, images, audio, video, etc. support, "graphics library"
seems too narrow of a description. Maybe it's better to think of as a GUI
library without a lot of commitments to the usual set of GUI widgets.

~~~
TehCorwiz
Cinder looks neat. I'm curious though, the only packages it offers are for
Windows or OS X. Do you know if it supports Linux at all?

~~~
mindviews
I've used it on Linux (Raspberry Pi for my case) just fine. Guides here if you
need it: [https://www.libcinder.org/docs/guides/linux-
notes/index.html](https://www.libcinder.org/docs/guides/linux-
notes/index.html)

~~~
TehCorwiz
Thanks! I'll give that a try.

------
yellowapple
Come on, man; if you're gonna allude to the awesomeness of a project's
website, the least you could do is actually _link_ to it!

For those as curious as I was:

Amulet:
[https://www.cs.cmu.edu/afs/cs.cmu.edu/project/amulet/www/amu...](https://www.cs.cmu.edu/afs/cs.cmu.edu/project/amulet/www/amulet-
home.html)

Yzone: [http://lifesoft.chat.ru/yzone/](http://lifesoft.chat.ru/yzone/)

------
gok
Ah cross-platform UI libraries, when you want the user experience of Electron
with the convenience and safety of C++.

~~~
BubRoss
This is beyond ignorant. I can create a tiny fast GUI with no dependencies
using fltk in 1/1000th the size that runs with zero lag or latency.

~~~
rightbyte
It might be nostalgia, but I kinda miss writing simple stupid looking in
practice fixed size and screen ratio win32-api apps.

It was so simple compared to how things work nowadays.

------
jasonhansel
It seems like native desktop app development is getting harder simply because
fewer people are doing it; web apps seem to be the future.

Less investment -> less modernization -> less usage -> even less investment

------
je42
Why not use dead projects ? I like TurboBadger for example.

It is pretty feature complete and the code base is well developed. so changes
and/or fixes can be done quite easily.

------
guido_vongraum
Sciter is fantastic, and honestly I don't get it why being closed source is a
con.

In fact, both 'commercial license / closed source' statements are not quite
true - one may link against the precompiled dll for free, even in commercial
apps (as cheap as that could be), while commercial licenses, starting from
fair $310 (a lifetime license!), are there for those who need static linking,
dedicated support and, mind you, access to the sources.

But even free users can expect a welcoming and timely response from the author
(Sciter is a one-man affair). I, for one, never had a condescending or
impolite reply to the dumbest of my questions.

Also, the article doesn't mention the fact that Sciter is more widespread than
it might seem - for example, many Windows AV solutions, including Eset,
Norton, Avast, Bitdefender and Comodo, use it as GUI engine.

~~~
yellowapple
> honestly I don't get it why being closed source is a con

Transparency is a dependency of trust. If it ain't transparent, then it's not
possible to trust it, end of story. This means that I'm going to be
significantly disinclined to use a library if I can't see its source code
(i.e. it's a binary blob with a header file). Sure, I could pay $310 for
access to the source code so I can audit it myself (or hire someone to audit
it for me)... or I could _not_ spend that money and use something I can
actually audit freely.

Same goes for static linking. I _could_ spend $310 for the ability to
statically link Sciter with my project... or I could _not_ spend that money
and use something I can include in any of my projects regardless of the
license for that project.

~~~
badsectoracula
What sort of incentive would an indie developer who makes his living from
sales of his software has to make his library malware and thus not only kill
any current and potential future commercial endeavor, but also open himself to
lawsuits from his own customers (among others)?

~~~
yellowapple
Maybe he wants to make a quick buck off users who don't pay for the source
code?

Maybe he's a Latvian sleeper agent looking to infiltrate government software
systems to boost the global potato market?

Maybe his machine was in turn infected by malware that's now able to spread
via his compilers to any software he in turn compiles, Ken-Thompson-Trusting-
Trust-style?

Maybe he sold it to someone else and the new owner is in one or more of the
above categories?

These sorts of things happen _all the time_. Why should I expect this library
to be an exception?

I mean, if you want to take that chance, go for it. Personally, given there
are numerous other options out there, I'd rather stick to something with a
FOSS license and source code that the general public (including myself) can
audit (and potentially even maintain, for reasons that I outlined in response
to the sibling comment).

~~~
guido_vongraum
> if you want to take that chance

No, I don't think I want, now that you've sown a seed of doubt in my mind..

It's just occurred to me that he well might be a covert princess who'll jump
out of my laptop, disguised as a frog, and demand me to kiss him in order to
dispel the evil spell!

------
theredbox
Honestly everyone should just use sciter and support Andrew.

~~~
int_19h
Why should everyone promote a closed source platform?

------
m0zg
When it comes to embedded in particular, Qt has another major disadvantage:
you have to pay royalties (!) to Qt, and worse yet, you have to deal with
their slimy salespeople.

~~~
ahartmetz
You don't have to pay royalties if you don't tivioze your device or (and that
isn't really a great long-term option) stay with version <= 5.6. About the
salespeople, my ex employer KDAB is a reseller and has a very different sales
culture. Try them.

~~~
ahartmetz
*tivoize obviously

