Hi, there. I got an error when I compile my program on mini2440. Here is the problem, I override a new frame class, but it incurs a compile error.
---------------------frame.h---------------
#ifndef FRAME_H
#define FRAME_H
#include <qframe.h>
#include <qpainter.h>
class Frame : public QFrame
{
Q_OBJECT
public:
Frame(QWidget* parent=0,const char* name=0,WFlags f=0);
protected:
//void paintEvent(QPaintEvent*);
private:
};
#endif
-------------frame.cpp---------------------
#include "frame.h"
Frame::Frame(QWidget* parent,const char* name,WFlags f)
: QFrame(parent,name,f)
{
setFrameStyle(QFrame::Panel);
}
/*
void Frame::paintEvent(QPainter *p)
{
QFrame::paintEvent(p);
}
*/
I add this class into hello project, then it shows:
undefined reference to `Frame::Frame[in-charge](QWidget*, char const*, unsigned)'
collect2: ld returned 1 exit status
make: *** [/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/bin/hello] Error 1
so, it means I had not add this class into the project successful? can somebody help me fixing this problem, any suggestions will be appreciated.