The signal signal_switch_page() does not work

213 views Asked by At

Hello I have a problem using the library Gtkmm. I have define a

Gtk::Notebook notebook;

but I have a problem with the signal

notebook.signal_switch_page().connect([this](){
std::cout << "It works !" << std::endl;
});

actually this signal does not work. Any suggestions ?

1

There are 1 answers

1
pan-mroku On

signal_switch_page's prototype is void on_my_switch_page(Widget* page, guint page_number) so the correct syntax is:

notebook.signal_switch_page().connect([this](Gtk::Widget* page, guint page_number){
            std::cout << "It works !" << std::endl;
        });