I have a QLabel that I dynamically update with a new .text like this
self.ui.mylabel.text = 'foobar'
The problem is that after that it doesn't update the new value on the window.
I tried calling self.app.processEvents() or even an update on the label itself self.ui.mylabel.update() and self.ui.mylabel.repaint() to no avail.
How do I get the QLabel widget to reflect the change?
I was doing it wrong. Calling self.ui.mylabel.setText('foobar') rather than accessing the property directly did the job.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With