title: C++ Qt Reflection with Copy and Assignment
body: <p>As <a href="http://qt-project.org/doc/qt-4.8/qobject.html#no-copy-constructor-or-assignment-operator">the <code>QObject</code> documentation</a> and many others explain, a <code>QObject</code> has an identity and thus hides its copy constructor and assignment operator.</p>
  
  <p>However, I'm not deriving from <code>QObject</code> for its dynamic properties feature or the signals/slots feature. I only want <strong>reflection</strong>, or the ability to access <code>Foo::staticMetaObject</code>.</p>
  
  <pre><code>class Foo : public QObject {
      Q_OBJECT
      Q_ENUMS(Color)
  public:
      enum Color { Blue, Red, Pink };
  private:
      Color color;
  };
  
  Q_DECLARE_METATYPE(Foo::Color)
  </code></pre>
  
  <p>I then can't copy <code>Foo</code> with:</p>
  
  <pre><code>Foo a;
  Foo b;
  a = b;
  </code></pre>
  
  <p>What's the best way to allow copy and assignment in this case? Do I absolutely need to write a copy constructor and assignment operator? What would they look like? Will reflection still work?</p>