there are two ways to set up ui
1.
//h-file
#include "ui_manysift.h"
class PaintImageWidget
: public QWidget,
private Ui
::Form{
Q_OBJECT
....
};
//cpp-file
PaintImageWidget
::PaintImageWidget(QWidget *parent
){
setupUi(this);
}
//h-file
#include "ui_manysift.h"
class PaintImageWidget : public QWidget, private Ui::Form
{
Q_OBJECT
....
};
//cpp-file
PaintImageWidget::PaintImageWidget(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
}
To copy to clipboard, switch view to plain text mode
2.
//h-file
#include "ui_manysift.h"
class PaintImageWidget
: public QWidget{
Q_OBJECT
....
private:
Ui::Form m_ui;
};
//cpp-file
PaintImageWidget
::PaintImageWidget(QWidget *parent
){
m_ui.setupUi(this);
}
//h-file
#include "ui_manysift.h"
class PaintImageWidget : public QWidget
{
Q_OBJECT
....
private:
Ui::Form m_ui;
};
//cpp-file
PaintImageWidget::PaintImageWidget(QWidget *parent)
: QWidget(parent)
{
m_ui.setupUi(this);
}
To copy to clipboard, switch view to plain text mode
PS. this is not compilable example, I can't do qmake && nmake.
Bookmarks