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
Highlighted
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Action Item, get the id of which was pressed?

I have a menu, when each action item is pressed I trigger a function:

 

 bool res = QObject::connect(action1, SIGNAL(triggered()), this, SLOT(handleAction()));
	 Q_ASSERT(res);
	 res = QObject::connect(action2, SIGNAL(triggered()), this, SLOT(handleAction()));
	 Q_ASSERT(res);
	 Q_UNUSED(res);

 Each action item triggers the same function. In that function is there a way to get the event? So I can tell which action item was pressed?

 

Thanks

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone