Help with modern GUIs?

Hey everyone, I've been away a long time, but I recently was able to find some time to pick up a new programming project and thought I would ask you guys for advice.

I have a program I want to make that requires a relatively flexible gui. Nothing super amazing, but I'd want a lot of widgets on screen, and I want nice things like dockable windows and whatnot. And cross-platform is definitely a plus.

Up until now I've pretty much used wxWidgets, but it leaves a bit to be desired. So I got to thinking of alternatives, and realized that I don't know how modern programs approach gui design. Should I even be using C++? Or should I use some other language?


So my question here is... what language/libs would you guys recommend for GUIs/widgetry?

Here's where I'm at with a few options:

- wxWidgets: It's ok but pretty bloated, and the window docking stuff is REALLY clunky. Plus some advanced widgets that I need (like grid controls with widgets in each cell) are either sorely lacking or extremely awkward for the end user.

- Qt: I wrestled with trying to get this to work with my toolchain for 2 hours more than I wanted to, and ultimately was unable to configure it for a 32-bit build. I'm sure the lib is great, but the "you have to use our special tools" thing really, REALLY irks me. I'm ready to toss it in the trash and never look at it again, but if enough people insist it's the way to go I might reconsider.

- Java: In my whole life, I've never seen a Java GUI that wasn't ugly as tar. But at least WYSIWYG and it's consistent and available on everything. But the real thing stopping me from going with Java is that I'd have to program in Java.

- C#: I could probably do most/everything I want in C#, but it's not exactly portable. Mono is pretty shakey.

- Python???? Gui libs seem to revolve around either wx or Qt. Is PyQt less stupid than C++ Qt?

- HTML5 / javascript / web??? Is this the future? I know nothing about HTML5 and next to nothing about Javascript, but what little web dev experience I have has conditioned me to hate it with a fiery passion.



Thoughts? Opinions? I appreciate any ideas.
Qt:
What toolchain are you using? I've always used VS with the Qt plugin and have never had any problems getting it up and running. Even working with two installed versions of Qt (one for each bitness) is pretty easy. The plugin also enables the debugger to inspect QStrings, which is very useful.

C#:
This is my default choice if I don't care about portability and just need to hammer something out really quickly. Mono is actually really solid. I've used it to write servers that can run unmodified on both Windows and Linux and it's just flawless. The problem is that WinForms isn't really supported. AFAIK, anyway; feel free to correct me on that one. I basically just tried running a very very simple WinForms executable on Linux and it didn't work, and didn't look further into it. It's possible there's some way to make it work.

The designer in VS is WYSIWYG pretty much always because it calls into the code to draw the contents of the window. Some of the widgets (ListView! *Shakes fist!*) in WinForms are artificially and bafflingly crippled relative to what .NET is capable of offering, but there pure CLR libraries out there that implement some crazy controls. For example:
http://objectlistview.sourceforge.net/cs/index.html

As for web technologies for desktop GUIs:
As a user, I hate them for being wasteful and slow. I wish someone would explain to me why the desktop version of Slack, which is a glorified IRC, needs to be just regular Slack running through a stripped-down Chrome.
As a developer, I hate them because I hate JS with the power of a thousand suns, probably for the same reasons you do.

EDIT: I forgot to mention. If you don't care that the GUI looks nothing like a native GUI, you could take a look at FLTK. The library is pretty small and easy to compile, and the widgets it includes seem quite capable.
Last edited on
Disch wrote:
Is this the future?
I hope not
Disch wrote:
I know nothing about HTML5 and next to nothing about Javascript, but what little web dev experience I have has conditioned me to hate it with a fiery passion.

With the experience I have in web development, and I can say helios's "hate JS with the power of a thousand suns" feeling is shared here. JS has its usefulness, but for the life of me I will never understand why it seems like darn near everything seems to be written in a stripped-down Chrome browser or some form of an embedded V8 engine.
I think it's probably because it's easy to program for, and libraries exist in JS for probably everything you can think of. And it's the new "fad", so everyone just seems to be doing it.

I don't understand the recent surge in dislike for lower level languages (well, low compared to JS).

Anyway, to hop off that train, I'll put my backing behind Qt if you want to write cross-platform code. Qt does have an IDE you can use, and I've never had an issue installing it. I'm pretty sure VS ties in very nicely with Qt. I can't make any claim either way about other toolchains.

I mainly like Qt because it tries to mimic a native look. If you really want to be gross, you can use WinApi. But then you present yourself with including Windows.h.
I would recommend C# with WPF. Winforms are pretty old now.
http://www.wpf-tutorial.com/
https://www.google.co.uk/search?q=WPFshowcase&client=firefox-b&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwjr_sjhiPnSAhViIMAKHYViDh0QsAQILg&biw=1344&bih=655#tbm=isch&q=WPF+showcase&*

Another option would be JavaFx, which looks much better than plain Swing.:
https://www.google.co.uk/search?q=JavaFX+showcase&client=firefox-b&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwjU65LXh_nSAhWBK8AKHTe-BBcQsAQINQ&biw=1344&bih=655

There are plenty more options. Sth. you should look for is sth. that is not pixel based, also layout managers are a must if you want to run you app on different screen sizes.
From what little I know about WPF, isn't it Windows only? .NET got open sourced, but I can't find anything that says WPF got ported.
That's not necessarily bad, just something to note if OP wanted cross-platform code.

I'll second the layout thing.

Java isn't all that bad, OP, and it's certainly better than running a JS UI inside an embedded V8 engine. Do mobile apps do this, too, or is this a PC kind of thing?
Do mobile apps do this, too
I believe some do, yes.
At the moment Mono has no plans to integrate WPF.
http://www.mono-project.com/docs/gui/wpf/
- Java: In my whole life, I've never seen a Java GUI that wasn't ugly as tar. [...] But the real thing stopping me from going with Java is that I'd have to program in Java.

Take a look at JavaFX (+1 Thomas1965) and Kotlin.
closed account (GTbMSL3A)
i've heard GUIs are hard to debug.
Topic archived. No new replies allowed.