stylesheet problem
Solved
General and Desktop
-
i use qt designer and i set mainwindow background...but every element i created after it take the same background even if i change stylesheet ....what can i do?
-
Hi
Read the docs :)
http://doc.qt.io/qt-5/stylesheet-reference.htmlMy guess is ( since you dont show the stylesheet )
That you are using a too broad selector so all children of mainwindow
is also affected. If its ONLY mainwindow u want,
then use
QMainwindow {
background: xxxx
}
Stylesheets are cascading. Meaning,
it also affects children, that is any other widget you put on
mainwindow.
But you can use ClassType, and object name and more for saying which one you target. -
@mrjj yes ,thats really what happend thanks alot for your time