class Mywindow(QDialog,Ui_Dialog):
def __init__(self,parent=None):
super(Mywindow, self).__init__(parent)
self.setupUi(self)
self.pushButton.clicked.connect(self.setColor)
super超继承:https://blog.csdn.net/mrlevo520/article/details/51783431