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
bcs925
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30

Cascades equivalent to Qt.openUrlExternally();?

Trying to open a link (google.com in this case) in the native browser when a button is clicked so I have (based off looking at qt help pages):

 

           Button {
    id: buttonID 
    imageSource: "asset:///images/lookup.png"  
    
    onClicked: {
        Qt.openUrlExternally("http://www.google.com/");      
               }
                   } 
        

  But when I click in the simulator I get:

 

### BAD_FRAME pid=143900695 at 231503564 ms -> t: 204 ms p1: 0 ms, r: 171 ms, p2: 0 mQDesktopServices::launchWebBrowser not implemented

 

So I assume this is not supported by Cascades, is there a simple alternative?

---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Please use plain text.
Developer
bcs925
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30

Re: Cascades equivalent to Qt.openUrlExternally();?

Actually instead of calling the browser I used Webview{} which worked perfect for my situation.  However still wonder if its easy to call the native browser like I said in the OP?  If not I'll just keep using Webview.

 

Thanks.

---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Please use plain text.
Developer
kylefowler
Posts: 526
Registered: ‎05-17-2009
My Device: 9900

Re: Cascades equivalent to Qt.openUrlExternally();?

You can invoke the native browser with bps/navigator.h header

 

and invoke like this...

 

navigator_invoke(openWebPageUrl.toString().toStdString().c_str(),0);

Like all of my posts
Please use plain text.