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: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition
My Carrier: Vodafone

Backbutton override on navigationpane

Hi,

 

I want to put one systemdialog on clicking back button of the navigation pane.How can I do this?

Rujuta Trivedi
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Backbutton override on navigationpane

ActionItem *action = new ActionItem;
navPane->setPaneProperties(NavigationPaneProperties::create()
.backButton(action));
QObject::connect(action, SIGNAL(triggered()), this, SLOT(showDialog)));

In showDialog slot show the dialog then call navPane->pop() when done.

 


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition
My Carrier: Vodafone

Re: Backbutton override on navigationpane

Sorry forgot to mention how to do it in qml doc?

Rujuta Trivedi
Highlighted
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Backbutton override on navigationpane

[ Edited ]

This page has an example for custom back button, search "QML implementation":

https://developer.blackberry.com/cascades/reference/bb__cascades__navigationpaneproperties.html

 


Andrey Fidrya, @zmeyc on twitter