basic menu in the GTK window #1481
Replies: 2 comments 2 replies
-
What kind of menu you are trying to set up? you would usually define that in a UI file as that is much much simple then using gio::MenuModel directly. |
Beta Was this translation helpful? Give feedback.
1 reply
-
OK I found an example of ui file in gtk4 doc
I put it in menu.ui in SRC folder then in .rs i add as explain in https://gtk-rs.org/gtk4-rs/git/docs/gtk4/struct.Builder.html does not compile ? I give up ... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
i do not understand the logic to show a menu in the window, I think that I understand I must use PopoverMenuBar, so I take the basic Hello World and add menu (in fn build_ui):
no error at compilation, but no menu shown on window
I understand in doc that I have to define a menuModel somewhere, I go to this page:
https://gtk-rs.org/gtk-rs-core/git/docs/gio/struct.MenuModel.html
but I do not understand what to do, there is no basic example in the documentation or https://github.com/gtk-rs/gtk4-rs/tree/master/examples.
Somebody would have a simple example, it would help ? Or may be PopoverMenuBar is not relevant (too complicated) for a basic menu and another structure is more suitable ???
Thanks for help.
Beta Was this translation helpful? Give feedback.
All reactions