[Kde-bindings] Re: Custom properties on QObjects defined in qtruby

Sven Moritz Hallberg hallberg at pre-sense.de
Thu Apr 14 19:55:24 UTC 2011


On 04/13/2011 08:17 PM, Sven Moritz Hallberg wrote:
> [ruby] qt_readprop(0 "stuff") -> "ho"         # ReadProperty called and...
> [ruby] qt_readprop(0 "stuff") -> "ho"         # ...returning correct value
> [qml]   stuff:                                # still, empty!?
> 
> maybe you have an idea which piece is missing... otherwise i'll do some more
> investigating...

got it, i remembered that QML wants all properties to be of QVariant type.
duh! now, declaring

    properties 'QVariant stuff READ getStuff WRITE changeStuff NOTIFY
stuffChanged'

works as intended!


because the READ/WRITE/NOTIFY stuff looks pretty generic, i'm thinking about
adding a simple variant

    properties :stuff

that would define suitable READ/WRITE methods and a NOTIFY signal. do you
think that would be a good idea or should it be a seperate function?


-- 
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/20110414/730508f7/attachment.sig>


More information about the Kde-bindings mailing list