Ok, I think I don't understand which class I must use (WCssStyleSheet or
WCssDecorationStyle), and then how to use it. Both don't work.

  sucheErgebnisse = new WSelectionBox();
  sucheErgebnisse->setModel(new WStandardItemModel(0, 1, sucheErgebnisse));
  sucheErgebnisse->addItem("test");
  WCssStyleSheet styleClass;
  styleClass.addRule("", "", "listem");
  sucheErgebnisse->model()->setData(0, 0, boost::any(styleClass),
StyleClassRole);

And at setData the Application crashed. It also don't work with
WCssStyleSheet *styleClass = new... and if I use WCssDecorationStyle,
there's ever the message Wt internal error: SyntaxError: missing } in
compound statement, code: undefined, description: undefined
with console-output: [fatal] "WAbstractItemModel: unsupported type
N2Wt19WCssDecorationStyleE"

Are you able to give me an example how to create the right stylesheet-class?

Koen Deforche schrieb:
> Hey Torsten,
>
> 2008/12/2 Koen Deforche <[EMAIL PROTECTED]>:
>   
>> To set the style class (you can already implement this now, and then
>> benefit from the support in WComboBox later):
>>     
>
> I was a bit too fast. You first have to change WComboBox'es default
> WStringListModel to a more general WStandardItemModel (or other model
> that also stores other role data and not just the strings).
>
> Thus, first you do:
>
> comboBox->setModel(new WStandardItemModel(0, 1, comboBox));
>
> And then:
>
>   
>> comboBox->model()->setData(index, 0, boost::any(styleClass), StyleClassRole);
>>     
>
> Oh, and this works now with the CVS version!
>
> Regards,
> koen
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>   


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to