title: Use qmlRegisterType with Q_ENUM and typedef enum
body: <p>I'd like to use in my QML files an enum coming from another header. After wrapping it with Q_ENUM, I can't make it work with <code>qmlRegisterType</code>:</p>
  
  <pre><code>class Test: public QObject
  {
       Q_OBJECT
  
       typedef foo::bar Foobar; // bar is the enum, contained in a namespace foo
  
       Q_ENUM(Foobar)
  
       public:
            static void declareQML()
            {
                qmlRegisterType&lt;Foobar&gt;("TestEnums", 1, 0, "Foobar");
            };
  }
  </code></pre>
  
  <p>With <code>MSVC 2013</code>, I'm getting the following error:</p>
  
  <pre><code>C:\Qt\5.7\msvc2013\include\QtQml\qqml.h:244: error: C2838: 'staticMetaObject' : illegal qualified name in member declaration
  
  see reference to function template instantiation 'int qmlRegisterType&lt;Test::Foobar&gt;(const char *,int,int,const char *)' being compiled
  </code></pre>
  
  <p>Is it because the enum is enclosed in a namespace? Note that I cannot amend the file containing the namespace and the enum (generated by <code>protobuf</code>).</p>