5qApp->setStyleSheet(
"QPushButton { color: white }");
10myPushButton->setStyleSheet(
"* { color: blue }");
15myPushButton->setStyleSheet(
"color: blue");
20qApp->setStyleSheet(
"QGroupBox { color: red; } ");
24qApp->setStyleSheet(
"QGroupBox, QGroupBox * { color: red; }");
34qApp->setStyleSheet(
"MyPushButton { background: yellow; }");
46qApp->setStyleSheet(
"ns--MyPushButton { background: yellow; }");
62qApp->setStyleSheet(
"QLineEdit { background-color: yellow }");
67myDialog->setStyleSheet(
"QLineEdit { background-color: yellow }");
72myDialog->setStyleSheet(
"QLineEdit#nameEdit { background-color: yellow }");
88 "background-color: yellow;"
89 "selection-color: yellow;"
90 "selection-background-color: blue;");
static void setAttribute(Qt::ApplicationAttribute attribute, bool on=true)
Sets the attribute attribute if on is true; otherwise clears the attribute.
The QLineEdit widget is a one-line text editor.
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
The QSpinBox class provides a spin box widget.
The QStyleOption class stores the parameters used by QStyle functions.
void initFrom(const QWidget *w)
@ AA_UseStyleSheetPropagationInWidgetStyles