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

Regular Contributor
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware
My Carrier: (none)

How to show a phonepad with a certain number in Blackberry Cascades

I am using Blackberry Cascades 10 Beta 3 SDK with C++ QT & QML with the Blackberry 10 Dev Alpha Simulator and the QNX Momentics IDE, and I'm trying to implement the ability to click on a button with a phone number from QML and have it bring up a dialpad with that number in from at which point the user should be able to press call and it would call that number. The following is the sort of thing I have done:


Button {


//just a sample number - I don't actually use this number



//I don't actually use the class name Foo}



and I have: ...


classFoo: publicQObject {



    Q_INVOKABLE void phone(QString number);



and I have:


void Foo::phone(QString number){

    bb::system::phone::Phone phone;

    phone.requestDialpad(number, bb::system::phone::LineType::Cellular);



But when I click on the button it doesn't do anything - I need the dialpad to show up - does anyone have any idea what I'm doing wrong?


In case your wondering - other Q_INVOKABLE member functions in the same class that phone is in - are callable from the same qml document as phone is in - so it's not an issue of the class not being registered through a certain variable to that specific qml document, nor is it an issue of not using the right variable name to refer to that class from the qml in the onClicked event handler