When you try to access the widgets on the form through the slot, then nothing happens. Maybe it should be?
form.cpp#include "form.h"
#include "ui_form.h"
#include<mainwindow.h>
Form::Form(QWidget *parent) :
QWidget(parent),
ui(new Ui::Form)
{
ui->setupUi(this);
MainWindow* m = new MainWindow;
connect(ui->p...