I have a MainWindow object built with Qt Creator. It contains one pushButton and one lineEdit widget. When the pushButton is clicked, a modeless dialog is shown. The modeless dialog contains one pushButton. When the dialog pushButton is clicked, I want to send a text message QString back to the lineEdit widget in the MainWindow. After reviewing the other similar Qt forum issues, I think a signal should be emitted from the Dialog pushButton to a slot "on_lineEdit_textChanged(const QString &arg1)" I added in the MainWindow object. How do I implement the signal to connect the button push event in the dialog to the lineEdit in the MainWindow? Thanks in advance.

MainWindow.cpp:
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "dialog_jeff.h"

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}

MainWindow::~MainWindow()
{
delete ui;
}

void MainWindow::on_pushButton_clicked()
{
Dialog_jeff *my_dialog;

my_dialog = new Dialog_jeff;

my_dialog->show();
}

void MainWindow::on_lineEdit_textChanged(const QString &arg1)
{
ui->lineEdit->setText(arg1);
}


Dialog: dialog_jeff.cpp:

#include "dialog_jeff.h"
#include "ui_dialog_jeff.h"

Dialog_jeff::Dialog_jeff(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog_jeff)
.....

void Dialog_jeff::on_pushButton_clicked()
{
//set text message back to mainwindow widget


}