If I have the following:
struct LineChartScene::LineChartSceneImpl
{
enum ContextMenuAction {ShowLabels, ShowPoints, SaveAsImage};
};
How can I access ShowLabels, ShowPoints etc outside LineChartScene::LineChartSceneImpl struct? I thought LineChartScene::LineChartSceneImpl::ContextMenuAction::ShowLabels would work but it doesn’t. I’m using C++, Qt Creator 2.2.1.
use it as
For your info, C++11 also has strong typed enums with precisely the namespace semantics you expected: