title: Using uint16_t and char* with QMetaObject::invokeMethod()
body: <p>I want to invoke a slot asynchronously from a different thread using <a href="http://qt-project.org/doc/qt-4.8/qmetaobject.html#invokeMethod" rel="noreferrer">QMetaObject::invokeMethod()</a></p>
  
  <p>The class containing the slot is declared as:</p>
  
  <pre><code>class Paintable : public QObject {
    Q_OBJECT
    [...]
    public slots:
      void drawString(uint16_t x, uint16_t y, uint16_t size, const char* str, color c);
  }
  </code></pre>
  
  <p>and the method that calls invokeMethod is defined as:</p>
  
  <pre><code>void drawStringAsynchronously(uint16_t x, uint16_t y, uint16_t size, const char* str, color c) {
    QMetaObject::invokeMethod(paintable,
                 "drawString",
                 Qt::QueuedConnection,
                 Q_ARG(uint16_t, x), Q_ARG(uint16_t, y), Q_ARG(uint16_t, size),
                 Q_ARG(const char*, str), Q_ARG(color, c));
  }
  </code></pre>
  
  <p>(where <code>paintable</code> is of type <code>Paintable*</code>)</p>
  
  <p>But Qt seems to be unable to use uint16_t or char* in invokeMethod because at runtime I get the following message:</p>
  
  <p><code>QMetaMethod::invoke: Unable to handle unregistered datatype 'const char*'</code></p>
  
  <p>and </p>
  
  <p><code>QMetaMethod::invoke: Unable to handle unregistered datatype 'uint16_t'</code></p>
  
  <p>respectively.</p>
  
  <p>I was able to successfully register my custom struct <code>color</code> using <code>qRegisterMetaType()</code> but since <code>uint16_t</code> and <code>char*</code> are no structs or classes this won't work.</p>
  
  <p>I'd be very glad if somebody could show me how to do it or show a good alternative.</p>