[Kde-bindings] How to unserialize types defined in other Qt apps in QtRuby?

Yaohan Chen yaohan.chen at gmail.com
Wed Feb 22 03:35:42 UTC 2012


Hello,

How can I unserialize objects of types defined in a C++ Qt app, through a
Qt::DataStream in QtRuby?

I am trying to create a scripting interface for the Qt IRC client Quassel
<http://quasselirc.org>. Quassel'score connects to IRC networks, and its 
client
displays its user interface. The two communicate through a socket, sending
QVariant maps and lists to each other, and each map or list is prefixed with a
uint32 indicating its size in the socket. My QtRuby client is able to read
some of the messages sent by core, but not the ones containing types defined
by Quassel. These messages show up as empty Qt maps. My code is at
<https://github.com/hagabaka/Quassel-Ruby> if it's of any interest.

It seems that normally qRegisterMetaType would be used for this, but I'm not
sure how to call a template function QtRuby. I don't have much experience with
C++ Qt programming either, but I would appreciate any pointers.


Yaohan Chen



More information about the Kde-bindings mailing list