This works fine:
#ifndef ABSTRACT_H
#define ABSTRACT_H
class abstract_class {
public:
abstract_class(){}
~abstract_class(){}
protected:
virtual void abstr_func1() = 0;
virtual void abstr_func2
(QObject*) = 0;
};
#endif
#ifndef ABSTRACT_H
#define ABSTRACT_H
class QObject;
class abstract_class {
public:
abstract_class(){}
~abstract_class(){}
protected:
virtual void abstr_func1() = 0;
virtual void abstr_func2(QObject*) = 0;
};
#endif
To copy to clipboard, switch view to plain text mode
#ifndef XXXX_H
#define XXXX_H
#include "abstract.h"
#include <QWidget>
Q_OBJECT
public:
~xxx();
};
class nonqt : public abstract_class{
public:
~nonqt();
private:
xxx* w2;
protected:
void abstr_func1();
};
#endif
#ifndef XXXX_H
#define XXXX_H
#include "abstract.h"
#include <QWidget>
class QObject;
class xxx : public QWidget {
Q_OBJECT
public:
xxx(QWidget* parent);
~xxx();
};
class nonqt : public abstract_class{
public:
nonqt(QObject* someptr);
~nonqt();
private:
QWidget *w1;
xxx* w2;
protected:
void abstr_func1();
void abstr_func2(QObject*);
};
#endif
To copy to clipboard, switch view to plain text mode
Are you sure you don't have any errors of your own?
Can you post some code?
Regards
Bookmarks