[gtkmm] How to add a pixmap column to TreeView ?



I tried 

append_column_editable("icon",mColumns.icon);

where mColumn.icon is declared as

Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> >  icon;

compiler says : 
/usr/include/gtkmm-2.0/gtkmm/treeview.h: In member function `void 
   Gtk::TreeView::_auto_store_on_cellrenderer_text_edited_string(const 
   Glib::ustring&, const Glib::ustring&, int) [with ColumnType = 
   Glib::RefPtr<Gdk::Pixbuf>]':
/usr/include/gtkmm-2.0/gtkmm/treeview.h:1133:   instantiated from `void
Gtk::TreeView_Private::_connect_auto_store_editable_signal_handler(Gtk::TreeView*, Gtk::CellRenderer*, const Gtk::TreeModelColumn<ColumnType>&) [with ColumnType = Glib::RefPtr<Gdk::Pixbuf>]'
/usr/include/gtkmm-2.0/gtkmm/treeview.h:950:   instantiated from `int
Gtk::TreeView::append_column_editable(const Glib::ustring&, const
Gtk::TreeModelColumn<ColumnType>&) [with ColumnType =
Glib::RefPtr<Gdk::Pixbuf>]'
FileTree.cc:6:   instantiated from here
/usr/include/gtkmm-2.0/gtkmm/treeview.h:1080: no matching function for
call to 
   `Glib::RefPtr<Gdk::Pixbuf>::RefPtr(const Glib::ustring&)'
/usr/include/gtkmm-2.0/glibmm/refptr.h:180: candidates are: 
   Glib::RefPtr<T_CppObject>::RefPtr(const Glib::RefPtr<T_CppObject>&)
[with 
   T_CppObject = Gdk::Pixbuf]
/usr/include/gtkmm-2.0/glibmm/refptr.h:172:                 
   Glib::RefPtr<T_CppObject>::RefPtr(T_CppObject*) [with T_CppObject = 
   Gdk::Pixbuf]
/usr/include/gtkmm-2.0/glibmm/refptr.h:159:                 
   Glib::RefPtr<T_CppObject>::RefPtr() [with T_CppObject = Gdk::Pixbuf]

If this append line is commented everything is ok. I have no idea how to
do it, and havent found an example.
thx 
morti


-- 
Mortella <mortella freestart hu>




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