QPushButton button1, button2, button3; button1.setStyleSheet("background-color: red"); button2.setStyleSheet("background-color:#ff0000;"); button3.setStyleSheet("background-color:rgb(255,0,0)");