I can't bind Gtk.Popover() to button.
1 Answer
You can associate the popover creation with a button event, like in the following example:
var button = new Gtk.Button ();
var imag = new Gtk.Image.from_icon_name ("help-info", Gtk.IconSize.MENU);
button.add (imag);
button.clicked.connect (() => {
var pop = new Gtk.Popover ();
//set popover content
pop.set_parent_pop (window);
pop.move_to_widget (button);
pop.show_all ();
pop.present ();
pop.run ();
pop.destroy ();
});
More info about Gtk.Popover :