Hello,
Please use code tags for better reading, viewing, and understanding of code.
check this link Code Tags
connect(ui
->lineEdit,
SIGNAL(textEdited
(QString)), dialog,
SLOT(seText
(s
)));
connect(ui->lineEdit, SIGNAL(textEdited(QString)), dialog, SLOT(seText(s)));
To copy to clipboard, switch view to plain text mode
The signature of a signal must match the signature of the receiving slot. You cant pass a value in the connect() statement , which is in your case SLOT(seText(s))
it should be SLOT(seText(QString)). You should always pass the signature , the type of the parameter that is passed by the signal or the slot not the string its self.
should be :
connect(ui
->lineEdit,
SIGNAL(textEdited
(QString)), dialog,
SLOT(seText
(QString)));
connect(ui->lineEdit, SIGNAL(textEdited(QString)), dialog, SLOT(seText(QString)));
To copy to clipboard, switch view to plain text mode
Signals and slots can take any number of arguments of any type. They are completely type safe.
you should check this link Signals and Slots.
PS. note the difference between textEdited and textChanged
textEdited()This signal is emitted whenever the text is edited. The text argument is the new text.
Unlike textChanged(), this signal is not emitted when the text is changed programmatically, for example, by calling setText().
in dialog.h
public slots :
void seText(QString q);
even in the header file the slot should be seText(QString). // just a declaration
you define the function in you .cpp file
Good Luck.
Bookmarks