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@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to