Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
47 lines (32 sloc) 1.28 KB
The :class:`Gtk.Popover` is a separate window used for displaying additional
information and is often used with button menus and context menus.
Popovers are visually connected to a related widget with a small triangle.
Their uses are similar to those of dialog windows with the advantage of being less
disruptive and having a connection with the widget the popover is pointing to.
A Popover can be created with :class:`Gtk.Popover`; for opening the popover use
Custom Popover
A widget can be added to a popover using :meth:`Gtk.Container.add`.
.. image:: ../images/popover_example.png
.. literalinclude:: ../examples/
Menu Popover
A popover can be created from a :class:`Gio.MenuModel` using
:meth:`Gtk.Popover.new_from_model` and can be changed after creation with
Passing a :class:`Gio.MenuModel` as a
:data:`menu_model <Gtk.MenuButton.props.menu_model>` argument to the
:class:`Gtk.MenuButton` constructor implicitly creates a popover.
.. image:: ../images/popover_advanced_example.png
.. literalinclude:: ../examples/
See Also