PDA

View Full Version : No such signal QLineEdit::textChanged(QString&)



zorro68
13th November 2007, 22:33
Someone knows what happend with this code:



connect(TXTxinf2, SIGNAL(textChanged(QString&)), this, SLOT(TXTValidar_changed(QLineEdit *)));


Compile without warning or error, but when i run the program say this (linux Qt-4.3.1):

Object::connect: No such signal QLineEdit::textChanged(QString&)

DeepDiver
13th November 2007, 22:38
Because it's:
void QLineEdit::textChanged ( const QString & text )

jpn
13th November 2007, 22:39
Also, signal and slot parameters must match. It makes no sense to connect a signal with QString parameter to a slot with QLineEdit* parameter. You can use QSignalMapper or QObject::sender() to identify signal sender.

DeepDiver
13th November 2007, 22:44
@jpn:

I WAS FASTER! :D
But you have been more precise! :o

zorro68
14th November 2007, 20:35
I have just solve it. Thanks to all