Compilation works now that the inclusion inside the class has been moved outside:
headerWorking.h
#ifndef HEADER_WORKING_H
#define HEADER_WORKING_H
#include <QObject>
#include <qqml.h>
#include "header1.h"
class ClassWorking: public QObject
{
Q_OBJECT
QML_ELEMENT
public:
Q_ENUM(TestType_t)
.
.
.
};
#endif
headerNotWorking.h
#ifndef HEADER_NOT_WORKING_H
#define HEADER_NOT_WORKING_H
#include <QObject>
#include <qqml.h>
#include "header1.h"
class ClassNotWorking: public QObject
{
Q_OBJECT
QML_ELEMENT
public:
Q_ENUM(TestType_t)
Q_INVOKABLE void foo(TestType_t testType);
.
.
.
};
#endif
I just recently started working on this project and didn't question why the inclusion happened inside the class.
Thanks @Some programmer dude and @Marek R