Re: ListStore + glade
- From: Alexey Savartsov <asavartsov gmail com>
- To: murrayc murrayc com
- Cc: demultiplexer7 freemail hu, gtkmm-list gnome org
- Subject: Re: ListStore + glade
- Date: Fri, 9 Apr 2010 01:43:21 +0400
> Thu, 29 Oct 2009 01:17:06 -0700
>
> On Wed, 2009-10-28 at 20:45 +0100, MDK wrote:
> > Hello,
> >
> > I am totally new to gtkmm so forgive me if I'm doing something seriously
> > wrong. I designed a window with some comboboxes on it using glade. I
> > filled the comboboxes in glade so I have liststores and cell renderers.
> > I can reach the widgets and liststores, my problem is that I don't know
> > how to reach the modelcolumn. I don't even know the name of the
> > modelcolumn since I don't see it in glade(file). Any suggestions?
>
> At least for now, gtkmm doesn't support TreeView model data defined in
> the glade file. You must define the model and its data in code.
Glib::RefPtr<Gtk::ListStore> m_refListStore;
...
Glib::RefPtr<Glib::Object> objListStore = get_object("liststore");
assert(objListStore);
m_refListStore = Glib::RefPtr<Gtk::ListStore>::cast_dynamic(objListStore);
Isn't something like this a way to acess liststores and other
non-widget objects? As for me, this code is working for treeview w/
liststore created in glade3, using [] operator and
Gtk::TreeModel::ColumnRecord derived class oblect or using
get/set_value.
--
Alexey Savartsov
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]