Qss语法
by萌马工作室
1·选择器
{property:value}
QPushButton {color: red}
2,几个选择器可以指定相同的声明,使用逗号",来分隔选择器。
例如:
QPushButton, QLineEdit, QComboBox{ color: red }
3·声明部分的规则有多个属性值时包含在花括号中,以分号分隔。
例如:
QPushButton { color: red; background-color: white; }
首字母大小写无所谓
setstyleSheet
ui->pushButton->setstylesheet(QString (“QPushButton{color:rgb(255, 0, 0)}”));
去掉注释