Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 79
Registered: ‎05-21-2012
My Device: DA C, Z10 LE, Passport
My Carrier: TIM
Accepted Solution

[solved] connect QObject signal cascades element

[ Edited ]

Hi,

 

I have a QObject derived class with signals. I would like to catch those in cascades.

I have exposed the class with:

qml->setContextProperty("myClass", this);

 

In qml there is Connections element to use like:

Connections {
     target: myClass
     onMySignal: foo(parameters)
}

 

How can I achieve this ?

Thanks for your time

Developer
Posts: 79
Registered: ‎05-21-2012
My Device: DA C, Z10 LE, Passport
My Carrier: TIM

Re: connect QObject signal cascades element

I got it to work with:

 

myClass.mySignal.connect(foo);

 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: connect QObject signal cascades element

See also this thread where I showed how you can use Connections still. http://supportforums.blackberry.com/t5/Cascades-Development/QtQuick-Connections-element-C-signals-in...

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!