Replace GUI Toolkit with QT #935
Replies: 14 comments 5 replies
-
I agree that it would be advantageous to migrate to a standard GUI toolkit, but I fear that Qt is not a good candidate.
Of course, XCSoar's GUI toolkit has large weaknesses (next to its great strengths). And Qt has advantages. Unfortunately, Qt is pretty much the only choice for a cross-platform toolkit. I wish we had better choices. |
Beta Was this translation helpful? Give feedback.
-
Question is: What do we gain using QT, or what are we lacking with what we have.
Is the Staus quo good enough compared the drain on already unsufficient resources to achieve the same with a different toolkit and maybe more contemporary look?
I‘d say: Let‘s choose our battles wisely, and stick in this area with what we have.
Unless someone dedicates him/herself full-time on the topic.
Cheers,
Kai
…Sent from my iPad
On Apr 8, 2019, at 22:28, Max Kellermann <notifications@github.com<mailto:notifications@github.com>> wrote:
I agree that it would be advantageous to migrate to a standard GUI toolkit, but I fear that Qt is not a good candidate.
* it requires an obscure preprocessor (moc) which means you're writing moc and not C++
* Qt is a bad citizen in the C++ world, e.g. declaring redundant classes such as QString instead of std::string, which adds overhead for each roundtrip from C++ and Qt; it has its own idea of multi-threading, instead of using what the C++ standard provides; and much more
* Qt works badly on the Kobo (just compare the performance of the original Kobo Qt-based GUI with XCSoar's software renderer)
* Qt has QML which sounds like a good idea, but it has yet to be demonstrated that it is as powerful as XCSoar's dynamic modal dialog code, which easily adapts to all screen formats and screen densities
* Qt adds a lot of bloat and runtime overhead; XCSoar's static Kobo binary weighs 5 MB (which already includes the whole GUI toolkit, the C++ standard library and the C standard library!), and Qt adds a whopping 25 MB to that, WTF!
Of course, XCSoar's GUI toolkit has large weaknesses (next to its great strengths). And Qt has advantages. Unfortunately, Qt is pretty much the only choice for a cross-platform toolkit. I wish we had better choices.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#181 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/APbi3UwVzwhVEw4b4sCT5trrdrhSQldeks5ve6Z5gaJpZM4cjAKk>.
|
Beta Was this translation helpful? Give feedback.
-
A nice overview: https://philippegroarke.com/posts/2018/c++_ui_solutions/ |
Beta Was this translation helpful? Give feedback.
-
Is it possible that we use the wxwidget library. Do you have think about it? |
Beta Was this translation helpful? Give feedback.
-
I always thought of wxWidgets that it combines the worst of all, being just a wrapper for some other native toolkit. On Linux, wxWidgets adds 20 MB, plus a dependency on GTK3 (another 10 MB). |
Beta Was this translation helpful? Give feedback.
-
Ok, thank you for your opinion. But the design of the buttons and so on are very bad. With a library like wxwidget its so easy to make it better. |
Beta Was this translation helpful? Give feedback.
-
Here's the code for rendering a button: XCSoar/src/Renderer/ButtonRenderer.cpp Lines 36 to 92 in acaa572 Yes, the button looks ugly and easy to make better. But you don't need wxWidgets for this. Just write some code, and submit it as a pull request. wxWidgets is incapable of rendering to the frame buffer on Linux; it requires X11 or GTK. I don't think it's a good candidate for XCSoar. It would add shitloads of unnecessary bloat. If anybody disagrees - show me some code and demonstrate that it runs well on all devices that Linux supports (Linux, Windows, Android, Kobo, Raspberry Pi with KMS or Wayland, ...). That's a very tough benchmark, but XCSoar's custom toolkit can do that extremely well (but is also extremely ugly). |
Beta Was this translation helpful? Give feedback.
-
I realize this is an older topic, but I thought it would be worth chiming in. My background is having used Qt extensively, including for a drone Ground Control Station and a sailboat chart application.
I don't understand this point. Everything in our GCS was written directly in C++ and QML, we never had a reason to work with the
I would argue that this is a feature, as C++ is not intended to be a multi-platform toolkit. There is a sublime beauty to being able to test your app on your desktop and know that it will look identical on every other platform, including iOS and embedded. There are of course compromises, but in my experience the time and effort we saved was the so substantial that I don't see how we could have succeeded otherwise.
That sounds like a blocker. Although Qt works on iOS and embedded, so you'd have to weigh it were worth it to lose a platform in order to gain another.
In my experience, Qt excels at adapting to different screen sizes and densities. That's not to say it's as good as what you already have.
Speaking from an embedded C background, where debates are about saving 4 bytes by using a FWIW, the binary might grow by even more when using QML, but I have never in my life seen anything as easy to develop as QML. It's almost magical the way the front-end javascript interacts with the backend C++, and it's impossible to overstate the advantage of decoupling front end people-- often time artists and others with limited computer programming background-- from the icky backend.
It would be nice to have more choices. IMHO, the biggest reason not to turn to Qt right now is the result of a company decision in January to make it much harder to use Qt for dev: https://www.qt.io/blog/qt-offering-changes-2020. The requirements to have an account mean that automated dev installs will die, with the upshot that it's very hard as project maintainers to make it so that everyone is contributing from the same versions. The loss of LTS is heartrending, as that means for safety critical tasks (which I think XCSoar is) that there is a loss of significant control over QC. That's a huge no-no. Of course, Qt can change course and undo these changes (and the marvelous KDE org is working hard to get a change of direction), but the fact that it has tried this is enough to make me think hard about using Qt any further. It seems likely that the KDE community will be able to continue development, but nowhere near as much and as fast as with corporate backing. There's also Flutter, but I don't think you'll get anywhere near the battery performance you get with Qt. |
Beta Was this translation helpful? Give feedback.
-
One more thing to chime in on (as a separate post because it's a separate notion from the above)
Quite possibly nothing, but it's important not to think of Qt as a GUI framework. It's a cross-platform interface framework, which interfaces as easily with people as with other machines. It has native support for BLE, serial ports, files, networking, maps of all kinds, javascript libs, online stores, user registration, etc... It's a swiss-army knife platform, and it works exceptionally well. So if your feature roadmap has you moving in lots of directions, all of which are orthogonal to each other, then Qt is immensely valuable. For instance, if you wanted to run a BLE interface with new-fangled wireless sensors, while providing an app which worked on iOS/Android and macOS/Win/Linux/embedded, and not blowing the battery budget, and supporting a variety of map sources, all while uploading user data (e.g. crowdsourced thermal location) in real-time, Qt would be the only way forward (short of having a hugely talented and diverse staff). If you're focusing on doing one thing and doing it extremely well, then stick with what you've got.
Support burden decreases significantly with Qt, both for doing development and bring onboard new devs. We gained significant momentum by lowering the barrier to contributions. People who had the UI/UX skills we needed were able to come up with meaningful code, instead of being stuck at only making feature requests in forums.
Amen. |
Beta Was this translation helpful? Give feedback.
-
Current Qt company politics means Qt is unacceptable to switch to. Maybe the KDE project decides to do a full-blown fork, that would be perfect. But Qt has lost a huge amount of my trust this week. It is hard to estimate the permanent damage that the Qt company has done to its own product with this move. |
Beta Was this translation helpful? Give feedback.
-
So there would be flutter
Its google owned.. |
Beta Was this translation helpful? Give feedback.
-
Flutter have interessing map widgets https://github.com/fleaflet/flutter_map https://www.syncfusion.com/flutter-widgets/flutter-maps https://www.youtube.com/watch?v=X48VuDVv0do https://pub.dev/packages/mapbox_gl (and probably more) which could be used to draw WMS / WMTS maps as mentionned in #521 |
Beta Was this translation helpful? Give feedback.
-
What about using HTML, every platform supports web rendering. It has ease of development and powerful styling/resizing. |
Beta Was this translation helpful? Give feedback.
-
Seeing all the drama, I kind of would like to close this discussion. The usability issues are certainly there. There is a project that tracks issues related to that https://github.com/XCSoar/XCSoar/projects/3 XCSoar's ui may be quirky, but i don't know another ui toolkit that handles so many use cases at once. XCSoar has input with gloves, joysticks, keyboards etc. Its designed for high contrast (so its readable on lousy screens), e-paper displays etc. The irony being that modern uis such as material you is already closer to xcsoar's current look than any of its predecessors |
Beta Was this translation helpful? Give feedback.
-
I know this is a long shot, but:
QT is supported on all the relevant platforms:
One of the major complexities is the GUI Toolkit that we currently use. (IMO). Moving to a well known[tm] system would lessen this.
QT would be attractive to developers and is well understood at this point.
kflog also seems to use qt: http://www.kflog.org/2016/07/cumulus-5-29-1/
Beta Was this translation helpful? Give feedback.
All reactions