title: How do I retrieve the value as my enum type from a QMap?
body: <p>I have a <code>QMap</code> like this:</p>
  
  <pre><code>QVariantMap dictionary;
  dictionary.insert("name", KeywordType::name);
  </code></pre>
  
  <p>but when I try to retrieve the value of <code>name</code> key as enum <code>KeywordType</code> type, which is <code>KeywordType::name</code> it return none (that's zero in the <code>KeywordType</code> enum):</p>
  
  <pre><code>  qDebug() &lt;&lt; dictionary["name"].value&lt;KeywordType&gt;();
  </code></pre>
  
  <p>How do i fix this?</p>
  
  <p>the enum type is registered to moc, it use:</p>
  
  <pre><code>Q_ENUM(KeywordType)
  Q_DECLARE_METATYPE(keywords::KeywordType)
  </code></pre>
  
  <p>and</p>
  
  <pre><code> qRegisterMetaType&lt;KeywordType&gt;("KeywordType");
  </code></pre>
  
  <p>to make know the typeded:</p>
  
  <pre><code>typedef keywords::KeywordType KeywordType;
  </code></pre>