[Solved] Problem with Q_OBJECT
-
I have such a class myLabel:
header:
@#ifndef MYLABEL_H
#define MYLABEL_H
#include <QLabel>
#include <QObject>class myLabel : public QLabel
{
//Q_OBJECT - when i uncomment it coompilator show me: undefined reference to 'vtable for myLabel'public:
myLabel();
bool flag_grid;private:
//bool flag_grid;
bool flag_markers;protected:
void paintEvent(QPaintEvent *e);
};#endif // MYLABEL_H@
source file:
@#include "myLabel.h"
#include <QPainterPath>
#include <QPainter>
#include <QLabel>
#include <QPixmap>myLabel::myLabel()
{}
do
void myLabel::paintEvent(QPaintEvent *e){}@
I would like to have a slots in this class but without Q_OBJECT it's impossible what i should add to this code to make it run??
-
As it was suggested you don't need to delete something by hands. Rerunning qmake (not compiler) should help you.
And if problem is solved don't forget to mark it as [solved]. -
Hey Denis, i know it's stupid question but where i should click to mark this thread as solved?? I don't see such option...
[quote author="Denis Kormalev" date="1306694082"]As it was suggested you don't need to delete something by hands. Rerunning qmake (not compiler) should help you.
And if problem is solved don't forget to mark it as [solved].[/quote] -
Simply edit your first post and add [solved] to title (better add it to beginning not to end of title)