How to set styleSheet to all QPushButtons?
-
Hello.
In CSS I have something like:
h1 { color:red; }which set text color in all h1 to red.
I would like the same in QT ( I don't want use QML ). When I set:
pushButton1->setStyleSheet("QPushButton {color:red;}");I set the text color only on this "pushButton1". How can I set styleSheet to all QPushButtons in my App ( using code - not uimainWindow )?
-
@Bonnie And extra question:
Is there any way to add names to QWidgets?
I think about this:
HTML and CSS:
<div id="myDiv"> </div>and next
#myDiv { height: 500px; width: 500 px; }So I would like use #Widget