Qt Code:
//any of these can reparent the widget. w->setParent(...); layout->addWidget(w); this->setLayout(layout); w->setStyle(...);//This line should be at the endTo copy to clipboard, switch view to plain text mode
Qt Code:
//any of these can reparent the widget. w->setParent(...); layout->addWidget(w); this->setLayout(layout); w->setStyle(...);//This line should be at the endTo copy to clipboard, switch view to plain text mode
I have tried the code,
QWidget * w = new QWidget;
w->setParent( ui.listWidget );
layout->addWidget( w );
this->setLayout( layout );
w->setStyle( new myWidgetStyle() );
But I am unable setStyle For the Widget.
The drawComplexControl function is called only if i set the CusomStyleClass in Applicationlevel.
Eventhough i didnt set any app level style, and applying the style class only for the widget, the drawComplexControl function is not called and the style is not applied.
The CustomStyle is applied only if i set the Style class in application Level.
Thank you,
Regards,
muthu
Thank you.
I got it by taking the children from parent widget
and applying style to subwidgets.
Thanks and regards,
muthu
Bookmarks