Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Button {
- text: "555-555-5555" //just a sample number - I don't actually use this number
- onClicked: Foo.phone(text) //I don't actually use the class name Foo
- }
- class Foo : public QObject {
- Q_OBJECT
- public:
- ...
- Q_INVOKABLE void phone(QString number);
- }
- ...
- void Foo::phone(QString number) {
- bb::system::phone::Phone phone;
- phone.requestDialpad(number, bb::system::phone::LineType::Cellular);
- }
- Button {
- onClicked: {
- _foo.callNumber("555-555-5555")
- }
- }
- import bb.cascades 1.0
- import bb.system.phone 1.0
- // Creates one page with a button. When you tap the button,
- // a dial pad with a specific phone number is displayed.
- Page {
- Container {
- layout: DockLayout {
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- Button {
- id: callButton
- text: "Call me, maybe"
- onClicked: {
- phone.requestDialpad("(519) 555-0100")
- }
- }
- }
- attachedObjects: [
- Phone {
- id: phone
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement