Possible you have to write something like this
file test.h
#ifndef __test_h
#define __test_h
namespace Ui {
class test;
};
{
Q_OBJECT
public:
YourWindow
(QWidget *parent
=0, Qt
::WFlags f
=0);
...
private:
Ui::test *UI;
...
};
#ifndef __test_h
#define __test_h
namespace Ui {
class test;
};
class YourWindow : public QMainWindow
{
Q_OBJECT
public:
YourWindow (QWidget *parent=0, Qt::WFlags f=0);
...
private:
Ui::test *UI;
...
};
To copy to clipboard, switch view to plain text mode
test.cpp
#include "ui_test.h"
#include "test.h"
YourWindow
:: YourWindow (QWidget *parent, Qt
::WFlags f
) :{
UI = new Ui::test;
UI->setup (this);
...
}
...
#include "ui_test.h"
#include "test.h"
YourWindow :: YourWindow (QWidget *parent, Qt::WFlags f) :
QMainWindow (parent, f)
{
UI = new Ui::test;
UI->setup (this);
...
}
...
To copy to clipboard, switch view to plain text mode
file main.cpp
#include <QApplication>
#include "test.h"
int main (int argc, char **argv)
{
YourWindow form;
form.show ();
return app.exec ();
}
#include <QApplication>
#include "test.h"
int main (int argc, char **argv)
{
QApplication app (argc, argv);
YourWindow form;
form.show ();
return app.exec ();
}
To copy to clipboard, switch view to plain text mode
Bookmarks