Take the 2-minute tour ×  I am new to qt, so I didn't quite get
the signal slot mechanism. here is my setup. Dialog class (its a
dialog with a lineEdit called "lineEdit") mainwindow class (that
has a lineEdit too)  I have this :  void
MainWindow::keyPressEvent(QKeyEvent *event) {  int
i=event->key(); //char z=(char)i;  // connect(ui->lineEdit,
SIGNAL(textChanged(QString)), dialog, SLOT(setText(QString)));
{ QString s= QString::number(i-'0');    I want to set the text
of dialog's lineEdit to q too. how do I got about that ?
share|improve this question add comment  1 Answer    1. You will
not go anywhere with Qt unless you understand the fundamentals.
Read the plentiful example code that came with it if
understanding documentation isn't your thing. Some people are
better at reading prose, some at reading code, there's nothing
wrong with that. Just be sure to do it :)    2. A QLineEdit
already processes its own keystrokes. There's no need to
reimplement that functionality.    3. Signal-slot connections
should