Re: begginer with C++



Carlos Garces wrote:

Hi.

Thanks, C++ is easy in anyone explain it :)
But my code don't work

mpGlade->get_widget("boxAbout", mpEventBox);
mpEventBox->set_events (Gdk::BUTTON_PRESS_MASK);
mpEventBox->signal_button_press_event().connect(sigc::mem_fun(*this,
&MainWindow::onAbout));

Fails on slot.h
error: return-statement with a value, in function returning 'void'

Un saludo
Carlos Garcés

Welcome Carlos,

Try this:
mpEventBox->set_events(Gdk::BUTTON_PRESS_MASK);

gtkmm wrapps the GDK enums inside the Gdk namespace.  You're trying to
pass in the base GTK+ enum instead of the gtkmm one.

Jonner

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Your callback function should look something like

bool MainWindow::onAbout(GdkEventKey* ev);


Jason

--
Jason Burchfield
CAS, Inc.
(256) 971-6096
Jason.Burchfield at cas-inc dot com




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