#include "mainwindow.h"#include "ui_mainwindow.h"MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow){ ui->setupUi(this);}MainWindow::~MainWindow(){ delete ui;}void MainWindow::on_YourName_textEdited(QString ){ Message.SetText(QString);}
void MainWindow::on_YourName_textEdited(const QString &text){ text.append(" Hello"); ui->Message->setText(text);}
void MainWindow::on_YourName_textEdited(const QString &text){ ui->Message->setText("Hello " + text);}
connect(widget.nameEdit,SIGNAL(textChanged(const QString &)),this,SLOT(textChanged(const QString &)));
SIGNAL(textChanged(const QString &)) - здесь сигнал, SLOT(textChanged(const QString &)) - здесь слот