Stylesheet problem with Qt > 5.12.2
-
Hi,
it is a bit tough to reproduce at home as you need indigo framework:
http://indigo-astronomy.org/ in order to use it.But the code is here:
https://github.com/indigo-astronomy/indigo_control_panel
file: qindigoproperty.cpp line: 64The issue is that the child widgets do not get properly decorated when compiled with Qt version > 5.12.2 (see the screenshots in my previous post) It should be all yellow in "Set Exposure" frame but on the bottom screenshot QLabel, QPushButton etc do not change their color and remain green only the frame color changed. While with Qt <= 5.12.2 it is as shown on the first screenshot!
Basically the ide is: it is all green, you hit "Set" button and whie exposure is in progress it should be all yellow which it is when build against Qt <=5.12.2 and is not if newer.I think the trouble code is here:
this->setStyleSheet(
"#INDIGO_property { background-color: #353520; border: 0px}"
"QLineEdit#INDIGO_property { background-color: #252520}"
"QPushButton#INDIGO_property { background-color: #454522 }"
"QPushButton#INDIGO_property:focus { background-color: #505022 }"
);all widgets are named as they should be:
QLabel* device_label = new QLabel(device_string);
device_label->setObjectName("INDIGO_property");regards
Rrumen -
I think this should also be reproducible with a small testcase - please file a bug report at https://bugreports.qt.io and attach the testcase.
-
Sorry I do not have time to make a simpler test. I will file the bug and describe it. will that be ok?
@Rumen-GB
Hi
While a bug description does help. without a sample to clearly show
the issue / regression, it might not get much love as in many cases its an
application bug and not directly Qt issues.I can see you use Widget Names as selector.
Is the issue you experience like it does ignore the
name and affect another widget even it has other name or what is
the actual thesis about what is broken between the versions ? -
@Rumen-GB
Hi
While a bug description does help. without a sample to clearly show
the issue / regression, it might not get much love as in many cases its an
application bug and not directly Qt issues.I can see you use Widget Names as selector.
Is the issue you experience like it does ignore the
name and affect another widget even it has other name or what is
the actual thesis about what is broken between the versions ?@mrjj the issue is that the stylesheet does not affect the child widgets. It did till qt 5.12.2 and stopped at 5.12.3. It is clearly seen on the screen shots. The frame by default is green. It should change to yellow during the exposure and back to green when done. Both screenshots are during the exposure. Note how buttons and labels keep its green background with 5.13 and are all yellow with 5.12.2. I played a bit and figured that this regression is introduced in 5.12.3
Rumen
-
@Rumen-GB
Hi
While a bug description does help. without a sample to clearly show
the issue / regression, it might not get much love as in many cases its an
application bug and not directly Qt issues.I can see you use Widget Names as selector.
Is the issue you experience like it does ignore the
name and affect another widget even it has other name or what is
the actual thesis about what is broken between the versions ?@mrjj said in Stylesheet problem with Qt > 5.12.2:
it might not get much love as in many cases its an
application bug and not directly Qt issues.That's the reason why I want a small reproducer - to see if it's really a Qt bug or not.
-
@mrjj said in Stylesheet problem with Qt > 5.12.2:
it might not get much love as in many cases its an
application bug and not directly Qt issues.That's the reason why I want a small reproducer - to see if it's really a Qt bug or not.
@Christian-Ehrlicher I agree but if this worked before 5.12.3 and now it stopped... I would assume it is a regression :)
-
@Rumen-GB said in Stylesheet problem with Qt > 5.12.2:
I would assume it is a regression :)
No matter what you think - if we can not reproduce it with a simple testcase, noone will be able to fix it.
-
Now I can prove it :) I created a test program to illustrate it.
it is all here:
https://bugreports.qt.io/browse/QTBUG-79545 -
Now I can prove it :) I created a test program to illustrate it.
it is all here:
https://bugreports.qt.io/browse/QTBUG-79545@Rumen-GB: thx, I cleaned it up a little bit and can reproduce it.
/edit: and found the solution - is already fixed in 5.12.6
-
@Rumen-GB said in Stylesheet problem with Qt > 5.12.2:
Hi, thanks can this be backported to 5.12.x?
Please read my last post.
-
@Rumen-GB said in Stylesheet problem with Qt > 5.12.2:
Hi, thanks can this be backported to 5.12.x?
Please read my last post.
@Christian-Ehrlicher thank you!