this post was submitted on 21 Sep 2024
76 points (100.0% liked)
Programming
17351 readers
323 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This is important to me, which narrows down my options quite a bit.
Electron is portable across desktop OS, but unacceptably bloated (I don't want my users to have to deal with that) and buggy (I don't want to deal with that).
wxWidgets and various similar wrapper libraries exist, but on Linux most of them wrap Gtk, which in recent years has become very opinionated in UI directions that I find intolerable.
A few new cross-platform GUI toolkits have been appearing recently, but I've found all of them suffer from poor text handling, anemic widget sets, or very out-of-place look and feel (especially keyboard navigation) relative to native applications.
That leaves Qt as my only reasonable choice, at least for now. This is mostly okay, as it does a wonderful job all around. My main complaint is that using the full power of its widgets and libraries means I'm restricted to a handful of languages: C++, Python, and maybe one or two minor ones like D. Its declarative API (Qt Quick) seems to be getting more language bindings, though, so simpler apps might be possible in other languages.
Note that the landscape is different for mobile apps. I don't have a recommendation for those.
What about Tauri? I don't know what exactly your app is but since you mentioned Electron as an option I guess Tauri could run it. Offers more choice for frontend frameworks hence less „language lock-in“ than Qt.
I mentioned Electron only to acknowledge a well-known cross-platform toolkit, not as an example of acceptable results.
Tauri on Linux is effectively a Gtk wrapper (plus WebKit), which makes it unappealing to me. I keep it bookmarked anyway just in case I find myself in a situation where the only other option is Electron, since I suspect Tauri would at least be lighter on system resources.
What about tcl/tk?
I don't enjoy writing in Tcl. If I were to use Tk today, it would probably be through Python's tkinter package.
IMHO, Tk interfaces look awful by default, but they can be made to look pretty decent if you're willing to hunt for (or create) a good theme. I have considered it a couple of times for trivial tool UIs, and I occasionally use one that someone else wrote.
That said, getting it to look native on multiple platforms would take more effort than I feel is worthwhile, and getting it to feel native (keyboard nav, etc.) even more so. Qt has this stuff built in, and a lot more.