pyqt5 or tkinter
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
How OS
Pretty much Qt. You can learn how different OSes have different way.
However, modern GUI programming is happening on the web and mobile phones. React is popular, but it's too high level and their XML-based approach is horrifically designed. Swift UI is nice, but it's Apple-only. Flutter is a good middle ground, but its Desktop capability is limited. You're going to shoot on your own foot several times.
~~modern~~ massively resource wasting GUI programming is happening on the web and mobile phones
there, I fixed it for you.
Slint
I really like Slint.
It has Python bindings, tho you wouldn't know it from the docs as it's brand new bindings.
However, it does WORK, and it works well.
Just look for python files in the examples and reference the slint docs (it uses its own UI lang for that stuff anyway).
I'm currently making an application in Python using Slint, and I really like it.
It also supports embedded systems, the web, and multiple languages, AND since it has its own UI lang, you can reuse parts of your UI code across different codebases
It seems to suit your use case.
Godot
Other than that, I second Godot.
HOWEVER
Godot's GD Script is not Python but rather a Python-like language. (in fact, in some ways, I'm glad it's not; there are things I prefer in GD Script).
This is important as you may want to use specific Python libraries which won't work with Godot!
You can, however, use GD Native to bind C++ code and thus C++ libraries, so you'll still be able to get done whatever you need to get done.
Iced
If you're not tied to Python, then I recommend the Rust library Iced as it is a very intuitive system. I really enjoy working with it.
Although, that said, Slint has great support for Rust, so maybe I'd recommend Slint anyway if you were gonna change language.
Warning Against Legacy
Avoid GTK, Qt, and TK at all costs imo. Also WinForms if ur on Windows.
They're old and crusty, and their APIs suck to use, even modern versions, and despite being aged, they're buggy still, not robust "tried-and-true" methods.
It's also hard to do dynamic stuff with them.
Just not well designed systems. Important, valuable to know bc they're used all over, but not well designed
Immediate
I would also try ImGUI.
It's meant more for gamedev UIs rather than Apps themselves (tho I've made a couple in it)
BUT
It's a totally different way of doing UI called "Immediate" bc you program the elements in a big loop, rather than event driven.
It's interesting and worth trying as a learning experience
React
And ofc, the Javascript/Electron world is huge and React is very popular with lots of tools. At least read up on it.
Very interesting of you to call gtk and qt legacy . Is this a common belief? I'm surprised to see this and never came across it before
The modern version of Gtk and its APIs started with the switch to Cairo back in Gtk 2.8 circa 2005. While Gtk 3 and 4 have undoubtedly improved upon Gtk 2, they fundamentally still work in a similar paradigm and still have all the crust of a 20 year old library. Like most old software projects, it has some level of backwards compatibility and deprecates and adds slowly. Gtk is, like, the definition of legacy, and Qt is in a similar boat. They're OLD old.
You could get started with Qt, specifically the legacy widgets. There are bindings for Python available (pyside or pyqt) if you don't want to learn C++ or another language right away. You can also port your GUI definitions to other languages at a later date.
Bless you for doing god's work. We need more GUI developers and a better ecosystem as a whole.
That said, it's pretty shite right now. Your established options are GTK and Qt. Qt uses C++ and I believe GTK uses C. I've only really looked briefly into Qt development, and it looks like there are bindings to Rust.
That said, I'm a firm believer that doing GUIs through code is an inefficient, cumbersome, and antiquated process that should be replaced with more visual alternatives, like we see in Godot Engine.
That said, I'm a firm believer that doing GUIs through code is an inefficient, cumbersome, and antiquated process that should be replaced with more visual alternatives
what do you mean? I'm not familiar with Godot.
Android comes to mind where most commonly you build the UI in XML. what do you think about that?
My goal is to code basic buttons and understand how operating systems implement the way they draw windows for applications.
So do you want to program a GUI yourself, and not using a library, correct ?
You can start with Tkinter since it's a standard python library. Here's a tutorial to get you started.
If you prefer non-kde apps, then consider Vala. It's a young-ish language and it's well suited for Gtk apps.
Toga is a blessing. You can make apps for Windows, MacOS, Android, iOS, Linux and Web - all with the same codebase!
If you are interested into dipping your toes into rust land there is a library called Iced that I have used before. I at least like it better tham pyqt
I don't see much point in making GUI apps for desktop nowadays, especially since desktop usage is in decline compared to smartphones. If you still want to, I'd go with iced, which is in rust, and well designed.
I'd recommend learning either android jetpack-compose, or iOS app dev.
I just know I’m gonna get raked, but try Lazarus. A Delphi clone using the FreePascal compiler. Has a framework similar to the VCL, but has pluggable backends. Qt, GTK, Windows, Cocoa, and a native one, though I’m not sure of its maturity. Component programming that is relatively easy to extend.