GTK4 Tutorials belong to Database

i am new in GTK4 and and if there any GTK4 Tutorials belong to Database
please can you share that

GTK has nothing to do with databases, so there aren’t any tutorials for that.

It would probably be easier if you explained you wanted to achieve.

How can we create datagridview with pagination in GTK4 with (create /update /delete /next /previous) buttons
please can you help us ?

This is not trivial.

You will need to map the query results to your own object class, and then you can store the object inside a GListModel implementation. Once you have the model, you can create a GtkListView or a GtkGridView. This won’t be paginated, though. If you want pagination, you will need to implement it manually, by having a list model for each page, and then switching between models.

Thank your, but is there any tutorials " object inside a GListModel with Gtk ListView or an Gtk GridView " , it’s will very usfeful for us. please

There’s only the API reference:

Hi one tutorial I found very nice is Toshios on github.com, link is here:
https://github.com/ToshioCP/Gtk4-tutorial

It is not directly connected with databases and glists but it will give you a good overview.

thank you so much , we will see that

One other good way, not exactly a tutorial is to look into the examples folder in gtk source:
https://gitlab.gnome.org/GNOME/gtk/-/tree/main/examples

its a progressive way from a simple window to an app. The bad side is that its not very nicely documented, but probably this way is even more instructive as you are forced to test it. Also the docs.gtk.org official documentation has a kind of tutorial here:
Gtk – 4.0: Getting Started with GTK

But I find it written to complicated.

2 posts were merged into an existing topic: Gtk4 / listview questions

There is a database library called libgda, but it is not very active. It has not been updated for use with GTK4 yet.

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