Originally Posted by
impeteperry
it seems to be missing a "}".
Yes, that } should be there. Besides you can't implement the same method twice (you have implemented the constructor in both .h and .cpp file).
It should be:
label.h
#ifndef LABEL_H
#define LABEL_H
#include "ui_label.h"
#include <QWidget>
{
Q_OBJECT
public:
private:
Ui::Label ui;
};
#endif
#ifndef LABEL_H
#define LABEL_H
#include "ui_label.h"
#include <QWidget>
class Label : public QWidget
{
Q_OBJECT
public:
Label( QWidget *parent = 0 );
private:
Ui::Label ui;
};
#endif
To copy to clipboard, switch view to plain text mode
label.cpp:
#include "label.h"
#include <QtGui>
{
ui.setupUi( this );
}
#include "label.h"
#include <QtGui>
Label::Label( QWidget *parent )
: QWidget( parent )
{
ui.setupUi( this );
}
To copy to clipboard, switch view to plain text mode
PS. Next time, please, use [ code ] tags, instead of [ quote ] for code snippets.
Bookmarks