[Interest] QLIneEdit Bug still valid ?

André Somers andre at familiesomers.nl
Tue Jul 17 10:22:19 CEST 2012


Op 17-7-2012 9:45, Tony Rietwyk schreef:
> Hi,
>
> A much easier solution to disconnecting the signals, is to set a flag before calling setText, then check that in the slot.
>
> Hope that helps,
>
> Tony
>
Or use QObject::blockSignals(true) on the line edit before you set the 
text, and the same with false afterwards. Seems easier to manage than 
another boolean flag somewhere, because it stays local to the place 
where you do the actual invokation. The flag would need code at three 
places: around the invokation, in the header as a member variable, and 
in the slot implementation when it is checked.

André




More information about the Interest mailing list