Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
11-14-2012 04:11 AM
I'm continuing to have issues with the touch signal emitted by VisualNode. I'm connecting to it as follows:
QObject::connect(m_Title, SIGNAL(touch(TouchEvent *)), this, SLOT(onTitleTouched(TouchEvent *)));
The console spits out the following error every time the label is touched:
Object::connect: No such signal bb::cascades::Label::touch(TouchEvent *) in ../src/xxxxxxx.cpp:121
The ultimate goal here is to have a ListView where each item has more than one hitbox and performs a different action when each is hit.
First, however, I have to be able to connect to a touch event for a label in C++. Any ideas how that can be done successfully?
Solved! Go to Solution.
11-14-2012 04:23 AM
For whatever reason explicitly adding the namespace (despite having it included in my source file) solved the issue:
QObject::connect(m_Title, SIGNAL(touch(bb::cascades::TouchEvent*)), this, SLOT(onTitleTouched(bb::cascades::TouchEvent*)));
11-14-2012 05:53 PM
The namespace has to be added because you need to refer to the signal in the *exact* way as it is defined in the header file. This is because the argument to SIGNAL() is not a function prototype but a string (even though it doesn't look like a string).
11-14-2012 10:02 PM
Yes; also, do not make the mistake of putting the variable names in the connect parameters, for those new to this