Re: Glib::Dialog signal_key_press_event problem



2010/12/4 Culpian Camilo Martin <camiloculpian gmail com>:
> Hi, I'm having a problem, when i connect a dialog to a
> signal_key_press_event, the event is not triggered
>
> I Connect:
>
> my_dialog->signal_key_press_event().connect(sigc::mem_fun(*this,
> &class_my_dialog::on_key_press_event));
>
> (my_dialog is a pointer to a Gtk::Dialog, i load them with gtkbuilder,
> and pass them with GtkBuilder_ref->get_widget("dialog.ui",my_dialog)
> inside the class class_my_dialog)
>
> And the funcion
>
> bool class_my_dialog::on_key_press_event(GdkEventKey *event)
>
> Is never called, Why?
>

Please read Programming with gtkmm. There is a section [1] about such signals
which are X events. They are handled a bit differently.

http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-xeventsignals.html.en


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]