[Interest] Q_ENUM doesn't work for private enums
Tom.Isaacson at navico.com
Sat Oct 27 03:07:32 CEST 2018
I'm using Qt 5.6 in Visual Studio 2017. I've got a class that looks like:
class tClass : public QObject
enum class eMode
When I add:
after the enum declaration I get an error:
moc_tclass.cpp(): error C2248: 'tClass::eMode': cannot access private enum declared in class 'tClass'
tclass.h(348): note: see declaration of 'tClass:: eMode'
tclass.h(): note: see declaration of 'tClass
Is this a known limitation of Q_ENUM? Is it fixed in later versions of Qt?
More information about the Interest