I have done this so far:
in dialog.h
public slots :
void seText(QString q);

in dialog .cpp::
void Dialog::seText(QString q)



in mainwindow.h ::
Dialog *dialog;

how do I connect two LineEdits (one is in mainwindow, and another is in dialog)
Dialog is my class name

I used this ::
connect(ui->lineEdit, SIGNAL(textEdited(QString)), dialog, SLOT(seText(s)));

its showing error::
QObject::connect: Cannot connect QLineEdit::textEdited(QString) to (null)::seText(s)

please be precise and explanatory as I am new to this concept.