Live data from Hacker News

Ask HN: What's the best library for making cross-platform UIs?

news.ycombinator.com

171–180 of 230 posts

Re: Ask HN: What's the best library for making cross-platform UIs?

#171
post #127
post #123

Here's what I want. - The UI to look as good or better than the UI on Mac OS X. I'm not willing to compromise on looks. - The library to be cross-platform. I want to deploy the software on Mac OS X, Windows, and Linux. I don't care about mobile right now. - I want it to be possible and easy to (a) develop new features on my own and (b) change existing features. I'd rather reimplement a textbox from scratch if it's th…

Pretty sure that C++ and Qt is what you want. Maybe not perfect in every sense, but widely used and battle-tested. If you don't want to deal with Windows, you can cross-compile for Windows from Linux using the mingw-* packages (eg https://fedoraproject.org/wiki/MinGW or the Debian or SUSE equivalents).

Or you can use preconfigured cross-compilation toolchain like MXE[1]. If you have clean codebase and use CMake it's usually enough to just pass one extra argument to get working binary out. And it's also work on OS X.

[1] http://mxe.cc/

Re: Ask HN: What's the best library for making cross-platform UIs?

#173
post #25

Earlier quoted context omitted.

Can the licensing be an issue on Android or iOS?

I still haven't found a clear answer to that, but using the LGPL license could pose a problem, because you need to allow the user to recompile the application with his own version of Qt. On iOS shared libraries are not allowed on the store, so you should distribute the files for static linking... it becomes quite messy and sort of unclear from the legal point of view.

Even if it's wasn't clear before now it's pretty clear - you must buy commercial license if you want to be on App Store. There was Qt license change[1] in January 2016 and there is no longer LGPLv2.1 licensed version since Qt 5.7.

Only option for commercial software currently is LGPLv3 and it's doesn't allow tivoization.

[1] https://subsurface-divelog.org/2016/02/subsurface-mobile-for...

Re: Ask HN: What's the best library for making cross-platform UIs?

#174
Here's what I use to develop Mutator's [0] and TestLess' [1] GUIs: - implement in Ruby - compile to Java using Warbler/JRuby - Run as Java on any platform that supports Java.

You can use javafx or swing, although javafx needs certain combination of warbler and jruby to work.

[0] http://ortask.com/mutator/

[1] http://ortask.com/testless/

Re: Ask HN: What's the best library for making cross-platform UIs?

#175

Qt has a truly pleasant API and bindings in many languages. If you haven't used it before - and I know you haven't, otherwise you wouldn't be asking :) - give it a try. There's very little that's more cross-platform.

Qt's nice, but the thing I've always disliked about it is that it re-implements all these basic types, like QString, QVector, QList, QMap, etc. and you need to use them to interact with all their APIs. So, you either have to decide you're all-in on Qt and have these QThis and QThat types littered all over your code (making it more difficult to interact with other third party libraries like boost that know nothing abo…

I'm working on a Qt project, and our convention is to have a pure C++ back-end (i.e., STL), but use QObjects everywhere on the Models, Views and Controllers (as per Qt's MVC pattern). That way we can one day re-implement the UI if needed and keep the same "pure" C++ back-end. This has worked fine for us so far.

Re: Ask HN: What's the best library for making cross-platform UIs?

#177

Earlier quoted context omitted.

> - The UI to look as good or better than the UI on Mac OS X. I'm not willing to compromise on looks. Just remember that the UI kit is only part of having a good UI. Apple's historical success with good UI is based on their long standing guidelines for designing good UIs. I doubt I need to tell you this (although Google seems to recently have forgotten it), you app needs to use the patterns of the platform it is on.…

> I doubt I need to tell you this (although Google seems to recently have forgotten it), you app needs to use the patterns of the platform it is on Not that I agree with it, but I am fairly certain Google has not forgotten - they have just remapped the definition of "platform" from "the operating system" to "Google's app constellation & sites". The pattern commonality is no longer with other apps on the OS you are cu…

The current YouTube app for Android still uses the iOS share icon rather than the Android one.

Re: Ask HN: What's the best library for making cross-platform UIs?

#179
post #79
post #52

I have used Electron previously, but now Ionic is my favorite http://ionicframework.com/

Electron is desktop only and Ionic is mobile only; you can't really compare them as there is never a choice between them.

Ionic 2 supports (or intends to support) Electron, desktop web and progressive web apps: http://blog.ionic.io/announcing-ionic-2-beta-7/

Re: Ask HN: What's the best library for making cross-platform UIs?

#180
post #150

Earlier quoted context omitted.

GTK's documentation is atrocious for anything in depth, and has been for years. Saying that from wrongly choosing it over Qt for a cross platform screenrecording/annotation project a few years ago. There's literally no way in hell to recommend GTK for any new desktop project that likely has a Windows audience. GTK is a mess. :(

@geraldcombs and @justinclift I didn't know any of this, thanks so much! It sounds like GTK is eliminated too. What's left now, QT and wxWidgets?

If you're looking to do a desktop GUI type of application, then those two are decent choices.

If you have skill in C++ already, then Qt is a natural fit there. Also, Qt's docs are very good. None of the "oh, I was advised to use this class. Where are the docs? What do you mean... go read the source code?".

Gah... sorry... still haven't gotten my extremely bad experiences with Gtk out of my system (years later). ;)

If I were doing a desktop GUI type app again, I'd choose Qt for sure. Good docs, very large user base, actively helpful Community on IRC. (I'm not really a forums guy). Plus, bunches of Qt code (of various quality) on GitHub for getting ideas from.

Hope that's useful. :)

Post reply on HN