PDA

View Full Version : Subclassing QLineEdit and suppress signal textChanged



Lykurg
15th February 2008, 16:23
Hi,

I am subclassing QLineEdit in order to check the input string, if can replace a defined two char sequence. G.e. "u:" should transformed in "ü".
How can I catch the signal textChanged() to perform my changes in a private slot and only after this the signal should go out the the other widgets? If I not suppress the signal, it is going out twice. Once for "u:" and once for the changed "ü". But I want that only the last one is emitted.


Thanks for suggestions,

Lykurg

jpn
15th February 2008, 16:25
Hi, forget about textChanged() signal but implement a QValidator and install it on the line edit widget. ;)

Lykurg
15th February 2008, 17:40
QValidator is just perfect for my issue!
Thanks