Live data from Hacker News

Writing GUI apps for Windows is painful

tulach.cc

571–577 of 577 posts

Re: Writing GUI apps for Windows is painful

#571
While I have dabbled in a number of GUI libraries - many of them were a few years ago so covering my views on those would be disingenuous. I remember using Win32 or MFC.. and dabbled in Qt, etc.

In recent years, I have used WPF/Avalonia and while they are good - can lead to a lot of bloat following MVVM.

In the last year, I remember needing an application that shows a map. I tried to find support for openstreetmap and, while they exist, did not support what I needed to do. I tried Avalonia, and then GTK, etc. To be honest, I really liked GTK.. it just didn't have the tools I needed, sadly.

I have leaned to immediate mode UIs these days. I like I can create something with minimal code. Sadly, no openstreetmap support from what I can see.

In the end, I created a web interface. openstreetmap (leaflet) did everything I needed.

Re: Writing GUI apps for Windows is painful

#572

Earlier quoted context omitted.

imgui offers incredible development speed. And I've used it many times with great success. It's unorthodox yes (and there's a long-open bug I won't talk about again) but it's dear to my heart. It's like MFC on steroids: You don't have to leave C++. But yeah at least a few of those caveats remain. Although keyboard navigation and font rendering have quite a bit of support.

Due to what reasons does imgui offer incredible development speed?

To add to this, I find it easier to have a simple while loop that renders the screen, fetching variable data on-the-fly, etc. It is rather pleasing to the eye to understand the layout with IM interfaces, etc.

Comparing this to (something like) WPF, you create XAML files, with either or combination of ViewModels and back-end code to "bind" and can get complicated quickly. I guess the only exception to this is if you have commited to WPF non-stop for many months. However, with IM interfaces, its easy to get going (imo)

Re: Writing GUI apps for Windows is painful

#573
post #468

Earlier quoted context omitted.

Right. I want your app to have consistency with the platform I’m using. Not between all platforms. With the exception of games try to use the native GUI. It’s the best choice most of the time.

Depends on the app size also. Is your app as large and important as the OS of the device (Chrome/facebook/etc...) you should probably have similar language across devices. Is your app very large but not that large? (Slack/teams come to mind) I think you can go either way. If you are smaller than that (hint: you are) then you should comply with the design language of the platform, even if that means somewhat large cha…

> Is your app as large and important as the OS of the device (Chrome/facebook/etc...) you should probably have similar language across devices.

No app is more important than the OS, and certainly not Facebook (which has no business being an app in the first place). I made a choice when I got the OS, and I like developers respecting it and not chase the fad of the day with poor approximations of the native widgets (text fields that do not support standard shortcuts, buttons that do not behave as they should, labels that do not support accessibility features, the list could go on). Even huge apps like Photoshop or Office get this wrong everywhere.

I definitely agree on the default (use the native toolkit), but there are no applications big enough to get their own behaviour. Open Source or hobby applications get a pass if the UI is a bit wonky, but that’s about it.

Re: Writing GUI apps for Windows is painful

#574

Earlier quoted context omitted.

Yes. For instance some Cisco app on iOS that uses gstreamer (LGPL) does exactly this.

Do you mean iOS the iphone operating system, or cisco IOS the router operating system?

the iPhone operating system: https://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/jabb...

Re: Writing GUI apps for Windows is painful

#575

Earlier quoted context omitted.

That’s fair in theory, but it really feels that they’ve made it more difficult to find the open source version of Qt last I checked. I haven’t tried to use it in a while, but I recall last time I tried I just gave up.

Unfortunately they do and they really try to scare you away with the GPL boogeyman. It is a fair criticism. I would recommend to ignore the installer entirely and rely on a package manger like vcpkg, conan, apt, or brew instead. You can find the manual installer here: https://www.qt.io/download-qt-installer-oss

Yeah I should have just used brew. I was trying to find the package for Mac a while ago to see if I could write some swift bindings. I moved on to messing around with some other library for my experimentation.

Re: Writing GUI apps for Windows is painful

#576

Earlier quoted context omitted.

Electron = nontrivial effort? What is so hard about Electron? The boilerplate is a snap, compared to Qt/Win32 boilerplate. Where do you fall down?

You need something else to run your electron app on mobiles. Ok, you take Capacitor, fine. Probably you'll take React (or something else) to manage your state. Great. You still need some UI toolkit. Literally all of them, even the paid ones, are pretty basic and dumb. So, most likely you'll have to make your UIs pretty basic and dumb, or reinvent the world and/or dig through tons of half-baked libraries which depreca…

I didn’t realize you were trying to take a desktop app to mobile. Outside my wheelhouse.
Post reply on HN