Can I use a custom widget as a popup menu?

2019-08-15 19:56发布

问题:

Basically, I want something that acts like a GtkMenu when it comes to focus and placement, but with an arbitrary widget (button, slider, tree, calendar... anything, really) inside. Putting the widget inside a GtkMenuItem doesn't work - that causes a lot of padding, and it's the MenuItem that receives click events instead of the widget. Is this possible?