Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

Recommendations for learning GTK4 UI creation in Debian

$
0
0
I have just completed a course on programming with C++. (Unfortunately, we did almost exclusively use the command line and only very briefly did extremely basic UI examples using Qt Creator. And since I prefer the look and feel of GTK+ over Qt I thought I should better learn how to create interfaces I do actually prefer.) Therefore, I want to create my first own small C++ project using GTK4. To get there, I try to work my way through the official gtkmm documentation. Unfortunately, in chapter 17 I discovered that Debian stable includes gtkmm 4.8 while some examples in the documentation need at least version 4.10 to work.

I usually try to stick with the versions provided by Debian stable to keep everything reliable and simple. But since I am learning something new it doesn't seem sensible to start with learning a deprecated standard.

According to my findings before GTK4 Glade was the go-to solution for creating user interfaces with GTK+ but at the moment development looks like a transitional state where Glade isn't really workable with GTK4 applications and Cambalache doesn't seem to be ready for general use yet. (So far it isn't part of Debian anyway.)

I am surprised how hard it is for me to understand gtkmm. I am not sure if my current approach of trying to learn to write all necessary code for GTK4 using gtkmm by hand is a sensible approach. I have already encountered examples where I failed to adapt or combine functions from different examples. (I can't even predict what methods and properties I should expect in Glib or GTK.) I am clearly missing some foundational understanding on how concepts in GTK do really fit together and muddle through trying to understand as much as possible on the way. This isn't an approach I feel very comfortable with. Maybe I am wasting a lot of time by messing with things I shouldn't even attempt yet. Maybe GTK was not the best choice to be used in my first C++ project because it is tailored towards C and since gtkmm is only a wrapper for C++. But I have already invested weeks in it and at least by now it is probably less confusing if I stick with it.

On YouTube I found someone who seems to have found a way to still use Glade to create GTK3 UI files which he then converts to GTK4. If possible I would like to avoid such a workaround.

I wonder how you experienced developers out there would approach this hurdle. Do you figure it would be sensible for me as a C++ beginner to switch to Debian testing and at least get gtkmm version 4.10? Would you recommend compiling Cambalanche from code and start working with it right away? Do you know of any more basic guide for learning GTK4 GUI development with C++? Unfortunately, my track record of resolving issues by consulting the GTK documentation has not been great so far because without examples I rarely understand how exactly properties and methods even need to be written in code.

Statistics: Posted by Onsemeliot — 2024-06-03 10:27 — Replies 1 — Views 73



Viewing all articles
Browse latest Browse all 3474

Trending Articles