Re: Gtk::Builder get_object
- From: Kjell Ahlstedt <kjell ahlstedt bredband net>
- To: Jonas Platte <jonasplatte myopera com>
- Cc: gtkmm-list gnome org
- Subject: Re: Gtk::Builder get_object
- Date: Sun, 06 Jan 2013 16:28:50 +0100
Glib::RefPtr<Gtk::Adjustment> pAdj =
Glib::RefPtr<Gtk::Adjustment>::cast_dynamic(builder->get_object("adjustment1"));
2013-01-06 15:13, Jonas Platte skrev:
Hello,
I have one obvious question: How to use Gtk::Builder::get_object()? I've
got a simple glade file, with some scales that use Gtk::Adjustment's,
and I simply want to use these. But I can't use
Gtk::Adjustment* pAdj = builder->get_object("adjustment1");
or something like that. The compiler always says it can't convert from
Glib::Object to Gtk::Adjustment. The only thing that I could compile
looked like this
Glib::RefPtr<Gtk::Adjustment> pAdj;
pAdj.cast_dynamic(builder->get_object("adjustment1"));
or similar. But that didn't get me a valid Adjustment. How am I supposed
to use get_object?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]