Live data from Hacker News

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

news.ycombinator.com

31–40 of 230 posts

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

#32
post #15
post #8

There is also swing and javafx if you want to use jvm.

JavaFX is amazing, but I'm not sure how it holds up when an app gets complex.

I think a bigger problem is that less and less end users have the JVM installed.

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

#33
post #17

I see nobody mentioned Juce. It is pretty neat if you like C++

JUCE is a great framework, has a very commendable coding style and is easy to get into. One thing to note is that the "JUCE way" of doing things is to have a UI that looks exactly the same on every platform - this is good for predictability, but if you want a UI that looks native, you're better off using Qt or wxWidgets (as C++ UI toolkits go).

In many cases I'd say that's not an issue, and JUCE is underrated/underused as a general-purpose UI toolkit.

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

#34
What is the best depends on your exact requirements but three good options to get a GUI off the ground quickly are Tk [1], wxWidgets (and wxPython [2] and wxLua [3] in particular) and Lazarus (LCL) [4].

Tk widgets look native on Windows and macOS (if you use the right ones — see [5]), though their behavior is implemented by Tk itself. On Linux it draws its own widgets in several styles; GTK and Qt theme support is immature. Lazarus and wxWidgets use native widgets on Windows and macOS. Both can use GTK2 on Linux but Lazarus also supports GTK1 and Qt.

If I had to deliver a cross-platform desktop GUI application by midnight today, I would go with Tk, write the code in Tcl (which necessarily has the best Tk integration) and package it in a static binary Starpack [6].

[1] http://www.tkdocs.com/

[2] https://wxpython.org/

[3] http://wxlua.sourceforge.net/

[4] http://www.lazarus-ide.org/, http://wiki.lazarus.freepascal.org/LCL

[5] http://www.tkdocs.com/tutorial/idle.html

[6] https://tcl.wiki/Starpack

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

#36
post #33
post #17

I see nobody mentioned Juce. It is pretty neat if you like C++

JUCE is a great framework, has a very commendable coding style and is easy to get into. One thing to note is that the "JUCE way" of doing things is to have a UI that looks exactly the same on every platform - this is good for predictability, but if you want a UI that looks native , you're better off using Qt or wxWidgets (as C++ UI toolkits go). In many cases I'd say that's not an issue, and JUCE is underrated/underu…

commendable coding style

Please explain!

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

#38
Strange nobody mentioned wxWidgets so far which gives you true native apps, so I'll do it:

http://wxwidgets.org

It provides API layer which compiles to Win32 API on Windows, Gtk2 on Linux and Carbon/Cocoa on Mac OSX.

Qt only emulates Windows controls, but wxWidgets uses the actual Windows controls via Microsoft Win32 API.

BTW, there's wxQt, a wxWidgets implementation that uses Qt instead of Gtk, but it's still experimental:

https://wiki.wxwidgets.org/WxQt

wxWidgets has been used by some popular projects like Audacity, TortoiseCVS, RapidSVN, FileZilla, BitTorrent, etc.

Another wxWidgets advantage over Qt is the license, which gives you more freedom.

If you're looking for a faster start, take a look at wxFormBuilder which is a graphical WYSIWYG UI editor where you can drop controls in windows/dialogs and hook up event handlers.

You can find links to more related tools/IDEs on the Wikipedia page:

https://en.wikipedia.org/wiki/WxWidgets

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

#39
post #33

Earlier quoted context omitted.

JUCE is a great framework, has a very commendable coding style and is easy to get into. One thing to note is that the "JUCE way" of doing things is to have a UI that looks exactly the same on every platform - this is good for predictability, but if you want a UI that looks native , you're better off using Qt or wxWidgets (as C++ UI toolkits go). In many cases I'd say that's not an issue, and JUCE is underrated/underu…

commendable coding style Please explain!

Well, commendable means "deserving praise", and when working with it, I generally appreciated the simplicity, consistency, and clarity I found throughout the JUCE codebase.

It also encourages you to adopt a coding style that's consistent with the rest of JUCE, particularly in terms of memory management. This is one of the things that makes it a lot more "framework" than "library", and again might not be for everyone. Take a look at the "Object lifetime and ownership" section in this page:

https://www.juce.com/learn/coding-standards

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

#40
post #20

Earlier quoted context omitted.

Obsolete. Nowadays qt libs are distributed on choice between commercial and lgpl

Don't you have to release the source code of your application if you don't want to pay?

No.

But different, if you are selling source -- then you pay.

Post reply on HN