How to create a menubar in a window without using the global app menubar

I need to modify the menubar in the window depending on the context displayed in the window, so using an app global menubar and ‘gtk_application_window_set_show_menubar’ is not possible.

But i cant see any GtkMenuBar class in the GTK4 documentation. How can i do this without moving to the ugly hack of using popovers instead?

If you really can’t use the “builtin” menubar, there isn’t anything stopping you adding your own, admittedly unfortunately named, PopoverMenuBar

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