[Kde-bindings] Re: qtruby: problem communicating ruby-defined objects via properties

Sven Moritz Hallberg hallberg at pre-sense.de
Wed Jun 1 14:55:43 UTC 2011


On 05/31/2011 10:21 PM, Richard Dale wrote:
>> note foo.bar being printed as QVariant(rObject) instead of Bar.
> I think it needs to be exposed as a QObject or maybe a QObject wrapped inside 
> a QVariant. The QML runtime doesn't know anything about about rObjects.

that's what i figure, too. afaict it should be a QVariant containing *some*
other type than rObject. alas, i'm stumped on what exactly. do we need to
register a type? or is it enough to use something generic?
(QMetaType::QObjectStar maybe?!) and then, how to actually create this
QVariant object? i can't see through the forest of constructors.


> So as the READ and WRITE method names aren't in the QMetaObject I would prefer 
> that we always call them as 'prop' and 'prop=', and then the code in 
> qt_metacall() wouldn't need to call qt_readprop() and qt_writeprop().

i wouldn't mind; you're the expert. i was just trying to stay as close to the
C++ way as possible. i'd say we should accept any keywords (READ/WRITE/...)
the original syntax allows and warn about ones we ignore.

-- 
Sven Moritz Hallberg                      hallberg at pre-sense.de
                                  Tel. +49 - 40 - 244 2407 - 28
                                  Fax  +49 - 40 - 244 2407 - 24
PRESENSE Technologies GmbH            Sachsenstr. 5, D-20097 HH
                                         USt-IdNr.: DE263765024
Geschäftsführer/Managing Directors       AG Hamburg, HRB 107844
Till Dörges           Jürgen Sander              Axel Theilmann

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20110601/7a2c19b5/attachment.sig>


More information about the Kde-bindings mailing list