为什么Qt不更新小部件?

时间:2019-11-10 09:38:21

标签: python pyqt5

为什么仅在单击行后才显示更改?

self.name1 = QtWidgets.QLineEdit(self)
self.name1.setAttribute(QtCore.Qt.WA_MacShowFocusRect, 0)
self.name1.setStyleSheet("background-color: rgb(52, 255, 220);")
...
 def button1_click(self):
        self.name1.setStyleSheet("background-color: rgb(82, 225, 220);\n"
"border: none;\n"
"qproperty-frame: false")
        self.name1.setReadOnly(True)

0 个答案:

没有答案