If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
neilhogg69
Posts: 34
Registered: ‎05-11-2012
My Device: Bold 9900
My Carrier: Vodacom
Accepted Solution

Get objectName of item touched in slot method

Hello

 

Is it possible to get the item's objectName that the slot is linked to when the slot method (in my case onTabClicked) is invoked?

My connection to the slot looks like this:

 

QObject::connect(tabImage, SIGNAL(touch(bb::cascades::TouchEvent *)), this,
SLOT(onTabClicked(bb::cascades::TouchEvent *)));

 

I have a few images generated by the same method and inserted into a container via C++ and all will invoke the onTabClicked method when touched. I would like to set the visibility of another image in the same container but for this I will need a objectName to identify the image i want to manipulate.

 

Hope i made my question clear enough, Thanks for any help

Please use plain text.
Developer
neilhogg69
Posts: 34
Registered: ‎05-11-2012
My Device: Bold 9900
My Carrier: Vodacom

Re: Get objectName of item touched in slot method

Found a solution in the Kakel example

ImageView* senderImage = dynamic_cast<ImageView*>(sender()); 

Please use plain text.