I have a class BatchItemthat inherits QObject, plus several classes that inherit from BatchItem:
#ifndef BATCHITEM_H
#define BATCHITEM_H
#include <QObject>
class BatchItem : public QObject
{
Q_OBJECT
public:
virtual void start() = 0;
virtual void stop() = 0;
signals:
};
#endif
Example class inheriting from BatchItem:
#ifndef VIDEOBATCHITEM_H
#define VIDEOBATCHITEM_H
#include "batchprocessing/batchitem.h"
#include <QtCore/QObject>
class VideoBatchItem : public BatchItem
{
Q_OBJECT
public:
explicit VideoBatchItem(, QObject *parent = 0);
void start();
void stop();
private:
};
#endif
And this is the corresponding .cpp:
#include "videobatchitem.h"
VideoBatchItem::VideoBatchItem(,
QObject *parent) :
,
QObject(parent)
{
}
But when I try to compile, I get the following error:
error: type ‘QObject’ is not a direct base of ‘VideoBatchItem’
, , , QObject VideoBatchItem. ?
, . QAbstractScrollArea, QFrame, , , QWidget? QWidget , QAbstractScrollArea QWidget.
, , .cpp .
QObject, - Qt ?