[GTK4] Looking for a way to signal my app when a cycling through pages in a GtkStack

,

Hello,

I’m building an application where I would like to hide certain buttons in my header bar based on the page the user is currently focused on. I need a way to capture a signal when a user switches pages but all I have found thus far is GObject::notify which did not give me what I was looking for.

Thanks!

The “notify” signal is detailed with the property that is being modified.

In this case, you want the GtkStack:visible-child-name or the GtkStack:visible-child properties, so connect to the notify::visible-child-name or notify::visible-child signals, respectively.

1 Like

Works like a charm! Thanks for your help!

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