[Interest] QLIneEdit Bug still valid ?
Bo Thorsen
bo at fioniasoftware.dk
Thu Jul 19 11:54:38 CEST 2012
Den 17-07-2012 10:22, André Somers skrev:
> 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.
Ah, you just hit one of my pet peeves :) When doing stuff like this,
create a class for it. Simpler to reuse and exception safe. For this
exact problem (blockSignals) I have the code on my blog:
http://www.fioniasoftware.dk/blog/?p=158
The code is trivial. But getting the habit of using objects for this
kind of problem is pretty important.
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Interest
mailing list