Hi
I'm trying to connect a button that is inside a widget(myCentralWidget). This widget is set as the QMainWindow central widget.
This is an example:
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
widget = new myCentralWidget(this);
setCentralWidget(widget);
// ...
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
widget = new myCentralWidget(this);
setCentralWidget(widget);
// ...
}
To copy to clipboard, switch view to plain text mode
All classes are created using Qt Designer Form class from Qt Creator: MainWindow and myCentralWidget.
How do i connect a button that is inside the ui of the myCentralWidget to make something happen in the qmainwindow?
Thanks
Bookmarks