[Interest] setting a widget style for a particular widget class only?

René J.V. Bertin rjvbertin at gmail.com
Sat Sep 10 17:07:11 CEST 2016


On Saturday September 10 2016 09:11:02 Andy wrote:

Hi Andy,

Thanks! I'm a bit confused that I didn't think of trying this myself, but it works:

https://bugsfiles.kde.org/attachment.cgi?id=101015

Shouldn't one release *style in the dtor?

R.


> René:
> 
> I think you can just use QWidget::setStyle().  Haven't tried it for
> QTabBar, but I use it on QButtons.
> 
> QStyle   *style = QStyleFactory::create( "fusion" );
> QPushButton   *button = new QPushButton( "foo", this );
> button->setStyle( style );




More information about the Interest mailing list