为什么仅在单击行后才显示更改?
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)