Best way to move forward (GTK4/GTK5). What widgets?

the app I currently develop (OTPClient) is using GTK3. Since I’m thinking about porting it to GTK4, I was reading about deprecated widgets, future plans for GTK5, etc., and I found out that both GtkDialog and GtkTreeView are gonna be removed.
Knowing that, I’d like to develop a port that will be compatible not only with GTK4, but also with GTK5 (and possible 6 and so on :stuck_out_tongue: ).
My questions are:

  1. what can I use instead of GtkDialog? Currently, I use this a lot to, for example, get user data (multiple gtk entries), show messages, wait for user input, etc.
  2. is GtkColumnView an appropriate substitute of GtkTreeView? Or should I look into GtkListView?

Thanks a lot

GtkDialog itself is mainly a GtkWindow subclass with some convenience API for creating buttons. If you have custom dialogs, then you can implement your own GtkWindow subclass and populate it with your UI. For asking messages, GTK 4.10 introduces GtkAlertDialog. If you are targeting GNOME, you can also use libadwaita’s AdwMessageDialog.

If you have a list of rows with a single column, use GtkListView. If you have a tabular list of rows with multiple columns, use GtkColumnView.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.