Re: Dynamic poplulating of TreeView/ListStore



Thanks Murray,

You are right, it doesn't seem to be that easy to do. It is certainly not
has high level as Qt, but I think I will be able to come up with something
based on ideas from the links you provided!

Greetings from Munich! ;-)

/Daniel




Murray Cumming-5 wrote:
> 
> On Fri, 2012-02-03 at 02:47 -0800, gig-raf wrote:
>> i still didn't find a solution for this, and since no one is answering or
>> commenting I guess it is either so simple that noone bothers to answer or
>> perhaps it is not even possible at all. A third option is that my
>> question
>> wasn't clear ;-)
> 
> You can create the TreeView::ModelColumn dynamically, and always be
> careful to dynamic_cast<> it to the derived type when you read data out.
> I do this here, though it's in the middle of some other complicated and
> ugly code:
> http://git.gnome.org/browse/glom/tree/glom/utility_widgets/adddel/adddel.cc#n559
> 
> It's not particularly easy or pretty, I'm afraid.
> 
> 
> For some similar code that shows (and edits) a database table, I used a
> custom TreeModel. That's not pretty either:
> http://git.gnome.org/browse/glom/tree/glom/mode_data/db_adddel/db_adddel.cc
> http://git.gnome.org/browse/glom/tree/glom/mode_data/datawidget/treemodel_db.h
> 
>> What I want to do can easily be done with Qt,
> 
> Well, that part of the Qt API has a lot less compile-time time safety
> anyway.
> 
> 
> -- 
> Murray Cumming
> murrayc murrayc com
> www.murrayc.com
> www.openismus.com
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 
> 

-- 
View this message in context: http://old.nabble.com/Dynamic-poplulating-of-TreeView-ListStore-tp33235223p33269771.html
Sent from the Gtkmm mailing list archive at Nabble.com.



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