I created the next enum and added it to my project as any other c++ class, but Im having the next error, when I try to compile my app, only when I add the enum:
/Users/jrobles/Felgo/Felgo/android_armv7/include/QtQml/qqmlprivate.h:106: error: only virtual member functions can be marked ‘override’
~QQmlElement() override {
^~~~~~~~~
I followed this tutorial: https://qml.guide/enums-in-qt-qml/
My code:
#ifndef TASKINFOTYPE_H
#define TASKINFOTYPE_H
#include <QObject>
class TaskInfoType
{
Q_GADGET
public:
explicit TaskInfoType();
static QString getLabel( int infoType );
enum Value{
COMMENT = 0,
LOCATION = 100,
CONTACT = 200,
AS_IMAGE = 300,
DOCUMENT = 400,
DATETIME = 500,
LINK = 600
};
Q_ENUM(Value)
};
#endif // TASKINFOTYPE_H
What Im doing wrong? The only difference is that I added a method to retrieve a label