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)));
if(i>=48&&i<=57)
{
QString s= QString::number(i-'0');
q+=s;
ui->lineEdit->setText(q);
}
I want to set the text of dialog's lineEdit to q too. how do I got about that ?