stylesheet is not working properly
-
qt 5.11.1 , linux.
i applied this stylesheet in the central widget .QFrame [accessibleName="windowBar"]{ background-color: #111111; color: #111111; border: 1px #111111; } QPushButton [accessibleName="windowBar"]{ border: 1px #2A2A2A; background-color: #111111; } QPushButton:hover [accessibleName="windowBar"]{ background-color: #1268A4; }
but is applied in designer fine ,but after build is shows this.
but is i use QWidget instead QFrame is works fine.
what is the problem.
-
@saber
Aha, i see what you mean now.
in Designer
But when run its gone.
Not sure why that happens. seems odd.it is most likely related to this
https://wiki.qt.io/Dynamic_Properties_and_Stylesheets -
@saber
Yep. Didn't get a green frame.
Its related to using properties in stylesheet as name works.QFrame#frame { background-color: #111111; color: #111111; border: 1px #111111; }
i thought maybe it was due to
accessibleName, but not shown using custom prop either.
So not sure why this case is not working.update:
after clean build folder
this started workingQFrame[styleit=true]{ background-color: #111111; color: #111111; border: 1px #111111; }
styleit as a custom property added with the green +
(bool as type) and check for widgets.I think the reason is the order in setupUI(). but did not test further.
-
@mrjj
sorry for the late reply.i did not understand the need and what is custom property is.
you know my app called corebox.
it has 14 apps combined .i am trying to add two theme by stylsheet .but i am facing many defecults .
it is just a one.so i am giving you invitation to join this project to solve this major problems that we are facing and not able to fix.
thanks.