[Interest] About Qt StyleSheet

André Somers andre at familiesomers.nl
Tue May 31 16:20:04 CEST 2016


Hi,

What I _think_ happens is that you currently are using a style that does 
not support style sheets. Only build in styles do, up to a point. If you 
then apply a style sheet, Qt probably switches to a fall-back style that 
_does_ support style sheets, but that has an effect on other widgets as 
well as you noticed.

I'd steer clear of using style sheets if you can. They generally end up 
being more trouble than the're worth even though it seems like a simple 
technique to use at first.

André

Note: I did not check any of this in either docs or source code.


Op 31/05/2016 om 10:55 schreef Berkay Elbir:
> Hello All,
>
> I have a problem about Qt Stylesheets. I use this code piece, this is 
> a QLabel inside a QDialog.
>
> ui.newGroupNameLabel->setStyleSheet("QLabel { color : black; }");
>
> I also tried giving it a name usingQObject::setObjectName() and use an 
> ID Selector to refer to it. But it still occurs.
>
> It affects whole project. I mean that affecting other widgets. All the 
> expand symbols change to plus sign. This QLabel is unrelated to this 
> widget(below).
> Did anyone face with this problem?
>
>
> Inline image 1
>
>
> Inline image 2
>
> Thanks in advance,
>
> Berkay
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160531/3c3b3772/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 807 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160531/3c3b3772/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 1018 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160531/3c3b3772/attachment-0001.png>


More information about the Interest mailing list