Hello, if i have created with QT Designer a class called ui_class.h with the main window layout and at the and i have declared this namespace:
namespace Ui {
class MainWindowClass: public Ui_MainWindowClass {};
}
namespace Ui {
class MainWindowClass: public Ui_MainWindowClass {};
}
To copy to clipboard, switch view to plain text mode
then i've made class.h in this way
#include <QtGui/QWidget>
#include "modify.h"
{
Q_OBJECT
public:
class();
~class();
private:
Ui::MainWindowClass ui;
Modify *modify;
};
#include <QtGui/QWidget>
#include "modify.h"
class class : public QMainWindow
{
Q_OBJECT
public:
class();
~class();
private:
Ui::MainWindowClass ui;
Modify *modify;
};
To copy to clipboard, switch view to plain text mode
and the class.cpp
#include <QtGui>
#include "class.h"
class::class()
{
ui.setupUi(this);
modify = new Modify(this);
}
server::~server(){}
#include <QtGui>
#include "class.h"
class::class()
{
ui.setupUi(this);
modify = new Modify(this);
}
server::~server(){}
To copy to clipboard, switch view to plain text mode
how is the constructor in modify.h? cos i want to pass at the modify.h a pointer at the "MainWindowClass ui" to have access at all the widget that i have in ui_class.h.
Is it possibile?
Bookmarks