@Gokulnathvc: the only problem with the line you pointed to is that is doesn't take a parent and pass is to the QMainWindow constructor:
Form1::Form1(QWidget* parent = 0) : QMainWindow(parent, 0)
To copy to clipboard, switch view to plain text mode
@Steve: the main problem is that he forgot to integrate the generated code, he only included the header ui_form.h:
#include "ui_form.h"
{
Q_OBJECT
public:
Form1();
~Form1();
protected slots:
void function1();
//this needs to be added:
private:
Ui_Form ui; //object or pointer whatever you prefer
// or you can use the class from Ui nanespace:
// Ui::Form ui;
// read the documentation page linked in my previous post
}
#include "ui_form.h"
class Form1:public QMainWindow
{
Q_OBJECT
public:
Form1();
~Form1();
protected slots:
void function1();
//this needs to be added:
private:
Ui_Form ui; //object or pointer whatever you prefer
// or you can use the class from Ui nanespace:
// Ui::Form ui;
// read the documentation page linked in my previous post
}
To copy to clipboard, switch view to plain text mode
Bookmarks