Hi,

the situation is following: the program inserts some WStandardItem
objects into a WStandardItemModel, which is the model of a WTreeView.

When using setData() and data() on a WStandardItem without setting the
role parameter (before inserting and after a selectionChanged() signal)
I get a boost::bad_any_cast exception when doing the any_cast on the
value returned by data().

When I specify on both methods Wt::UserRole as role parameter
everything works as expected.

This surprises me because the API docs list for both methods 'UserRole'
as default value of the role parameter, e.g.
http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WStandardItem.html#afbe54e68e576c4902c9085f8966c93ef

Hm, bug or feature?

Best regards
Georg Sauthoff


------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to