I have the follow code:
self.pushButton = QtGui.QPushButton(Form) self.pushButton.setGeometry(QtCore.QRect(0, 550, 150, 31)) self.pushButton.setObjectName(_f
Here is a sample code. You can choose any style to set background color.
QPushButton button1, button2, button3; button1.setStyleSheet("background-color: red"); button2.setStyleSheet("background-color:#ff0000;"); button3.setStyleSheet("background-color:rgb(255,0,0)");