QT stylesheet not getting applied randomly
-
I have applied the stylesheet for whole application using qApp->setStylesheet() but randomly 2-3 times a week when application is opened the qss is not fully applied and it gets applied when the application is closed and relogined. Made a stylesheet editor which is used to apply stylesheet at runtime but when the above case happens that stylesheet editor also doesn't work.
Can anyone help to tell what could be the case or anything else which is happening other than stylesheet part?? -
I have applied the stylesheet for whole application using qApp->setStylesheet() but randomly 2-3 times a week when application is opened the qss is not fully applied and it gets applied when the application is closed and relogined. Made a stylesheet editor which is used to apply stylesheet at runtime but when the above case happens that stylesheet editor also doesn't work.
Can anyone help to tell what could be the case or anything else which is happening other than stylesheet part??Hi, welcome to the forum.
Can anyone help to tell what could be the case
How? "I made an app and it doesn't work like I want it to. Can someone tell me what's wrong" - is basically what you've given us. There's a bug in your app, that's all I can say.
Please provide more information, like the code you use to apply the stylesheet. Where do you do it? Where does the stylesheet come from (file, resource, code)? Do you have any code that changes stylesheets after that? Do you set a stylesheet that could've overridden what you set? What does the
stylesheet()
method on the app return when it's not applied? What does it mean that it is "not fully applied"? Does it apply to some widgets and not others? If so what's different about them? Does it apply only some properties and not others? What are they? Do you have any branches in the code that applies the stylesheet? What have you already tried to diagnose the problem? What Qt version are you using? On which platform? Does it happen on your computer or others too? Are you able to cut your app down to have a minimal code example that exhibits this behavior?