5 ms·
Qt and to some extent GTK+ come close. GTK+ can be programmed in Vala which is a fine language that transpiles to C and supports idioms such as asynchronous pro
by bonzini 7y ago
Qt and to some extent GTK+ come close. GTK+ can be programmed in Vala which is a fine language that transpiles to C and supports idioms such as asynchronous programming.
- marton78 7y agoThat's cross platform for Windows, Mac and Linux, but what about Web, Android and iOS?
- tjoff 7y agoYou do not want the same UI on desktop and mobile.
- shakna 7y agoIgnoring that you probably _don't_ want the same interface across all of those... Qt, as well as Windows, macOS and Linux actually can do Android [0] and iOS [1], and Web is halfway there [2]. [0] https://doc.qt.io/qt-5/android.html https://doc.qt.io/qt-5/android.html [1] https://doc.qt.io/qt-5/ios.html https://doc.qt.io/qt-5/ios.html [2] https://wiki.qt.io/Qt_for_WebAssembly https://wiki.qt.io/Qt_for_WebAssembly
- danShumway 7y agoI just want to step in quick to advocate. Please do not use Qt for the web. Their web export tools aren't just unfinished, they're actively hostile to web paradigms. The finished product doesn't render to the DOM, it's completely screenreader inaccessible, it overrides browser preferences. In a lot of ways, Qt on the web is even worse than Flash was. You know all of the arguments against Electron that people trot out about how it's not real native, and it doesn't follow the right UX conventions or paradigms? Qt on the web is exactly like Electron on native, except way worse and without any sign that it's going to improve, because fundamentally Qt is structured around the idea that it should be able to spit out a binary blob of pixels instead of hooking into web-native primitives like the DOM. Look into something that's showing more promise, like .NET and Razor. The Rust community is also doing some good work here, although I don't know that they have any UI frameworks that are mature enough to be reliable in an enterprise setting. These aren't true cross-platform efforts yet, since they're still forcing you to think about HTML. But if I was going to bet on any project ending up with a real cross-platform solution that felt good on the web, some kind of export option from an Open Source Windows Forms or similar is probably what I would bet on. Either Microsoft or (possibly) the Rust community are the two parties that I think are most likely to end up producing a true native UI toolkit that can actually export to the web in a usable, acceptable way.
- Kipters 7y agoXamarin and Uno Platform
- leadingthenet 7y agoThat's exactly what your users don't want you to do!
- mmariani 7y agoBeeware [0] does it too, natively in python. The architecture and code base are very nice as well. [1] [0] http://www.beeware.org http://www.beeware.org [1] https://dan.yeaw.me/posts/gui-widget-for-beeware/ https://dan.yeaw.me/posts/gui-widget-for-beeware/
- Const-me 7y ago> Qt and to some extent GTK+ come close Both are C++: developers are more expensive to hire, and stuff takes more time to develop and debug. I'm proficient in C++ (programming for living since 2000), but I wouldn't pick the language for 2D GUIs in 2019. > GTK+ can be programmed in Vala Picking a non-mainstream languages is risky. Harder to find developers. Way more likely to find bugs in the toolchain and these can easily cost weeks to fix.
- bonzini 7y agoYou can also write GTK+ in JavaScript for that matter, or Python. Vala is a very underrated language though and it should be very easy for a good JavaScript programmer to pick it up.
- Snetry 7y agoEnough languages have bindings for GTK or Qt to make it viable
- kleiba 7y agobut I wouldn't pick the language for 2D GUIs in 2019 Which one would you recommend?
- Const-me 7y agoI mostly program for Windows and use C# for the GUI. Cross-platform story is complicated, though. I have good experience creating a custom GUI framework for embedded Linux: drm/kms, gles, NanoVG, [DllImport], everything on top is custom C# code in .NET core 2.2. But that approach is not for everyone. I only needed 10-15 screens with simple GUI on them, it’s a 5” touchscreen with no other user-facing devices. Creating more advanced UX this way would consume too much time. There’re Avalonia and Xamarin. Didn’t used them at that time because I needed full-screen GUI for a single-application Linux, without any desktop environments or user mode OS components. For desktops and especially mobile apps they might work OK. It’s unpopular opinion here, but I think Electron is not that bad for GUI, esp. when writing TypeScript instead of JS. I think it’s similar story to Unity3D or PHP: low entry barrier attracted inexperienced programmers, then the whole ecosystem is judged based on the output of these inexperienced people.