Re: Gtk::Treestore buildable appending data?
Phil Wolff via gtkmm-list <[email protected]> Fri, 24 Dec 2021 04:32:12 -0800
| Newsgroups | gmane.comp.gnome.gtkmm |
|---|---|
| Message-ID | <[email protected]> |
https://developer-old.gnome.org/gtkmm-tutorial/stable/sec-treeview-examples.html.en#treestore-example
On 12/24/21 3:38 AM, Roland Schwarz wrote:
> Dear all,
>
> is this a place to ask gtkmm usage questions?
>
> If so:
> I am trying to append data to a GtkTreestore which is defined in a
> buildable description ui file.
>
> I can successfully load the GtkTreeStore from the ui file, but cannot
> figure out how to add data to the store. The only way coming close (no
> complaints during compile) is
>
> ...
> auto treestore = m_refBuilder->get_object("treestore");
> m_treestore = Glib::RefPtr<Gtk::TreeStore>::cast_dynamic(treestore);
> ...
> auto iter = m_treestore->append();
> iter->set_value(0, Glib::ustring("test"));
> ...
>
> The definition in the ui file is:
> ...
> <object class="GtkTreeStore" id="treestore">
> <columns>
> <column type="gchararray"/>
> <column type="gchararray"/>
> </columns>
> </object>
> ...
>
>
> During runtime, however I get a lot of assertions, dealing with type
> issues as far as I understand, and nothing is displayed in the
> treeview widget.
>
> Can anyone point me to a worked example please?
>
> Thank you for caring,
> Roland
>
>
> _______________________________________________
> gtkmm-list mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/gtkmm-list
--
What was that about a rising tide lifting all boats? What if you don't
have a boat?
— Eugene Robinson
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list