https://developer.ubuntu.com/api/scopes/cpp/sdk-15.04/previewwidgets/
I tried to used the example code shown in the above link:
PreviewWidget expandable("exp", "expandable"); expandable.add_attribute_value("title", Variant("This is an expandable widget")); expandable.add_attribute_value("collapsed-widgets", Variant(0)); PreviewWidget w1("w1", "text"); w1.add_attribute_value("title", Variant("Subwidget 1")); w1.add_attribute_value("text", Variant("A text")); PreviewWidget w2("w2", "text"); w2.add_attribute_value("title", Variant("Subwidget 2")); w2.add_attribute_value("text", Variant("A text")); expandable.add_widget(w1); expandable.add_widget(w2);
regardless of what number is defined in "collapsed-widgets", it always shows all of the widgets there.
Thanks & best regards, XiaoGuo
https:/ /developer. ubuntu. com/api/ scopes/ cpp/sdk- 15.04/previewwi dgets/
I tried to used the example code shown in the above link:
PreviewWidget expandable("exp", "expandable"); add_attribute_ value(" title", Variant("This is an expandable widget")); add_attribute_ value(" collapsed- widgets" , Variant(0)); attribute_ value(" title", Variant("Subwidget 1")); attribute_ value(" text", Variant("A text")); attribute_ value(" title", Variant("Subwidget 2")); attribute_ value(" text", Variant("A text")); add_widget( w1); add_widget( w2);
expandable.
expandable.
PreviewWidget w1("w1", "text");
w1.add_
w1.add_
PreviewWidget w2("w2", "text");
w2.add_
w2.add_
expandable.
expandable.
regardless of what number is defined in "collapsed- widgets" , it always shows all of the widgets there.
Thanks & best regards,
XiaoGuo