As I understand, Form1 is the class and this is the pointer of the class (object).
Now solved my problem:
If I get a signal from the pushbutton1, I send a signal with the form. This signal will be catch from the pushbutton in the mainwindow.
In form1.cpp:
{
ui->setupUi(this);
connect(ui->pushButton1,SIGNAL(clicked()),this,SIGNAL(wantToSetEnabled()));
}
Form1::Form1(QWidget *parent) :QWidget(parent),ui(new Ui::Form1)
{
ui->setupUi(this);
connect(ui->pushButton1,SIGNAL(clicked()),this,SIGNAL(wantToSetEnabled()));
}
To copy to clipboard, switch view to plain text mode
In form1.h:
signals:
void wantToSetEnabled();
signals:
void wantToSetEnabled();
To copy to clipboard, switch view to plain text mode
In mainwindow.cpp:
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
connect(ui->winwin,SIGNAL(wantToSetEnabled()),ui->pushButton,SLOT(click()));
}
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
connect(ui->winwin,SIGNAL(wantToSetEnabled()),ui->pushButton,SLOT(click()));
}
To copy to clipboard, switch view to plain text mode
thx, for your time and your patience.
Bookmarks