PDA

View Full Version : [PyQt4] check if value of QLabel changed



ja.heller
29th April 2014, 18:37
I Need to check if the value (str) of a qlabel changed.
I think about using the following code (nearly the same as used by a spinbox widget in PyQt):


self.connect(self.ui.labelEntry, QtCore.SIGNAL("valueChanged(str)"), self.autovalidate)

What's the correct Methode to check if value changed?

All the best;

anda_skoa
29th April 2014, 20:34
QLabel doesn't have a change signal for its text property.

Cheers,
_

ChrisW67
30th April 2014, 01:51
The only way that the label text can change is if your program code changes it, so there is little point in the label separately announcing that it changed.