graciano
23rd January 2014, 16:31
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) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
widget = new myCentralWidget(this);
setCentralWidget(widget);
// ...
}
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
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) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
widget = new myCentralWidget(this);
setCentralWidget(widget);
// ...
}
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