I can't bind Gtk.Popover() to button.

1 Answer 1


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 :



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.