[gtkmm] Gtk::TreeView and float



hi,
I'm trying to use Gtk::TreeView with float. But it won't work!

I exchanged in the Gtk::TreeView Example
<http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch08s06.html#id2881731>
the line

Gtk::TreeModelColumn<unsigned int> m_col_id;

with

Gtk::TreeModelColumn<float> m_col_id;

But the compiler says

$ g++ -Wall -W `pkg-config gtkmm-2.0 --libs --cflags` treeview_doc.cc
/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 = float]':
/usr/include/gtkmm-2.0/gtkmm/treeview.h:1202:   instantiated from `void Gtk::TreeView_Private::_connect_auto_store_editable_signal_handler(Gtk::TreeView*, Gtk::CellRenderer*, const Gtk::TreeModelColumn<ColumnType>&) [with ColumnType = float]'
/usr/include/gtkmm-2.0/gtkmm/treeview.h:962:   instantiated from `int Gtk::TreeView::append_column_editable(const Glib::ustring&, const Gtk::TreeModelColumn<ColumnType>&) [with ColumnType = float]'
treeview_doc.cc:85:   instantiated from here
/usr/include/gtkmm-2.0/gtkmm/treeview.h:1150: error: `const class Glib::ustring
   ' used where a floating point value was expected
/usr/include/gtkmm-2.0/gtkmm/treeview.h:1150: error: aggregate value used where 
   a float was expected
$

how can I use Gtk::TreeView with float?

regerads,
Ruediger Sonderfeld <cplusplushelp gmx net>



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