There is a pyqt label object called xVal1
, which is stored as a string in the variable op_name
A
self.op_name.setText(op_value)
An error appears when I try to change the label text like this.
I think it's a type problem, so even if you convert an object to op_name = QLabel(op_name)
, the object has no attribute
error appears Is there a way?
Please check it out
There is a pyqt label object called xVal1
self.xVal1 = QLabel("old Label : ", self)
I saved this as a string in the variable op_nameA
self.op_name = self.xVal1.text()
self.op_name.setText(op_value) I'm trying to change the label text like this, but I get an error.
op_value = 'new Label : '
# # ERROR : self.op_name.setText(op_value)
self.xVal1.setText(op_value )
© 2024 OneMinuteCode. All rights reserved.