Earlier quoted context omitted.
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...
Ask HN: What's the best library for making cross-platform UIs?
221–230 of 230 posts
Re: Ask HN: What's the best library for making cross-platform UIs?
#222Just getting started on Electron myself. Used by Atom, Slack, Visual Studio... It's worth a look ;) Electron - Build Cross-Platform Desktop Apps With HTML, JS, CSS http://electron.atom.io/
Re: Ask HN: What's the best library for making cross-platform UIs?
#223Earlier quoted context omitted.
> it's much harder to get right than it seems I'm not disputing this but I've yet to see a clear explanation why it's harder to get right than it seems. I want to understand, precisely, what makes this hard.
It's not necessarily hard but it is a ton of work and requires a lot of low level knowledge of the underlying window system. You need to have a very good understanding of the layer beneath you (xlib, Wayland, win32) and how fonts are rendered on the various systems you want to support. There's also various tradeoffs you need to make. Do you go with custom drawn widgets or use native ones? Native offers a shortcut if…
Re: Ask HN: What's the best library for making cross-platform UIs?
#224For a file manager I'm developing [1], this question recently boiled down to Electron vs (Py)Qt. I chose (Py)Qt because Electron's startup speed is too slow. [1]: https://fman.io
How are you handling licensing? Are you using the commercial version of PyQt? I've been thinking of distributing some apps I've built but I don't want to make them GPL (I don't mind using MIT or BSD though).
Re: Ask HN: What's the best library for making cross-platform UIs?
#225Earlier quoted context omitted.
Before you start to roll your own consider that there have been many attempts to do this already and they have all failed to varying degrees. The reason for this is that it's much harder to get right than it seems. QT is what I've used when a client is determined to go down this path, but if a web app doesn't make sense the best option is almost always to spend extra time making sure that most of your code is portabl…
> it's much harder to get right than it seems I'm not disputing this but I've yet to see a clear explanation why it's harder to get right than it seems. I want to understand, precisely, what makes this hard.
low level differences:
There are differences between GDI and xlib. For instance GDI has a concept of a "combo box" at the API level and in X11 you need to either roll your own or use a higher level GUI toolkit. IIRC, Handling of the non-client area and window scrolling are different between platforms and handling of audio/video is completely different between platforms.
There are a LOT of features:
Power modes (e.g. suspend, hibernate, low battery), tooltips, the clipboard, drag and drop, maximize, and a bunch of subtly different "must have" features need to work between platforms and you need to know what all those features are. Accessibility should work and touch/gesture support is likely to become important over the next few years. At the point where you start cutting features to make it more manageable you have started down the road of making another crappy "lowest common denominator" GUI toolkit and you are better off just using QT.
User expectations are different between platforms:
This is mostly a lot of little details, like where the "close" button goes, what a "right click" does, menu layouts, standard icons, and which direction the window scrolls when you move the mouse wheel "up" but it adds up to an application not feeling right. You can see this taken to an extreme with any number of bad ports from console to PC.
Re: Ask HN: What's the best library for making cross-platform UIs?
#226Earlier quoted context omitted.
Tk is antiquated (no antialiasing [1]) and has a poor look on Linux. It lacks functionality in widgets such as embedding a progressbar in a tree/list (don't remember) widget, which Qt supports. Also, poor font rendering support. (doesn't render Devanagari and probably CJK scripts). It feels like a 10 year old tech which it is. (1) Maybe there is some option for it somewhere, but if so, having antialiasing disabled by…
Tk is 25-year-old tech, not 10. ;-) It has also maintained backwards compatibility since 1997 or so, which is a nice feature to have in many cases but comes at a price. For example, you have to know to use a "ttk::button", not a plain "button", to get the native (Windows, macOS) or a least the somewhat better-looking (*nix) widget. The result is that old Tk software still runs unchanged instead of forcing its maintai…
Sorry, I was thinking about antialiased drawings (canvas). Text was antialiased if I remember correctly.
IIRC Tk only has linear gradients, no fancy gradients that is needed to make your GUI look good.
Re: Ask HN: What's the best library for making cross-platform UIs?
#227Earlier quoted context omitted.
This comment says Tk is limited https://news.ycombinator.com/item?id=12381978 You and the GP say it's not. Is there anything Tk can't do? Also a question on fonts. Does Tk make it possible to use webfonts I see on websites?
>You and the GP say it's not. But I did not say that. In the reply to the comment you've linked you write that "this thread believes Tk is as good as QT". I am puzzled by this conclusion because I do not see any comparison to Qt at all. Certainly, I didn't want to suggest any with my comments. If you want to know my option on how Tk compares to Qt, I currently believe that, for the most part, they serve different use…
Actually, I would argue the opposite. I found it easy to create GUIs using Qt Designer and to use connect() to bind functionality together. (Albeit, this was with Python, it might be harder in C++).
> widgets like canvas and the text editor
Is there something particularly unique in Tk's canvas and text editor?
Re: Ask HN: What's the best library for making cross-platform UIs?
#228Depends on what you're after :) Electron or QT for cross-desktop apps, Angular & Ion framework for cross-mobile apps, React & React-native for cross-mobile apps
There are efforts to bring React Native to desktop but I don't think they are production ready yet.
Re: Ask HN: What's the best library for making cross-platform UIs?
#229Earlier quoted context omitted.
GTK+ is dreadful on Windows. I'd stay away. Personally I implement the UI in as thin a layer as can be architected and reimplement for every platform. It's the best way, and probably cheaper for most apps than trying to force some lowest common denominator library to express what you want in high fidelity.
Ok, no GTK+! (Could this be fixed with GLib?) I didn't understand this. When you say you implement the UI as a thin layer do you mean you wrap only the few controls you need?
GLib is a utility library; it provides things like container types, filesystem access, networking utilities, threads, object-oriented programming with events and properties, and other similar functions in a platform-independent manner. GTK+ uses GLib. You can use GLib on its own as well. It won't solve the problem of GTK+ being clunky on Windows, though.
Re: Ask HN: What's the best library for making cross-platform UIs?
#230Earlier quoted context omitted.
Ok, no GTK+! (Could this be fixed with GLib?) I didn't understand this. When you say you implement the UI as a thin layer do you mean you wrap only the few controls you need?
libui only wraps around GTK+ on Unix systems. On Windows, it uses the native Windows API directly. GLib is a utility library; it provides things like container types, filesystem access, networking utilities, threads, object-oriented programming with events and properties, and other similar functions in a platform-independent manner. GTK+ uses GLib. You can use GLib on its own as well. It won't solve the problem of GT…
I thought that was GLib, and GTK+ was using GLib to implement controls.
Which library does one need to build their own controls?