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
New Contributor
Glawe
Posts: 8
Registered: ‎03-06-2012
My Device: Playbook, 9900
My Carrier: Telenor

Problem with QWebView

Hello,

 

I was just starting to get a taste of my playbook i got at the mwc in barcelona. Really love it and my old ipad2 is long gone! Thanks Blackberry! :smileyhappy:

 

Anyway, i followed the guide over here: http://wiki.qt-project.org/QNX to compile qt and the example code runs just fine on the playbook (QTGui works with no problems). However, when i try to use the QWebView the app instantly crashes. Im not sure how to debug from cli, so if you can point me into the right direction it would be great. Also i have compiled qt both on os x 10.7 and on a ubuntu box just to see of was anything with my mac and the webkit compile, but its the same thing. Heres the code that is crashing:

 

#include <QWebView>

int main(int argc, char *argv[])
{  
  QApplication a(argc, argv); 
  QWebView view;
  view.load(QUrl("http://www.google.com")); //<-- This is the line that makes it crash, without the line i get a nice white empty webview
  view.showMaximized();
  return a.exec();
}

 

Br. F

 

 

Please use plain text.
Contributor
madhanbalus
Posts: 18
Registered: ‎02-10-2012
My Device: playbook
My Carrier: Airtel

Re: Problem with QWebView

Even i hav the same problem.. Am using Qt creator 4.8 for playbook. Gui apps so far i have tried are working but when i used QWebView, the app crashes during the launch. All i did was just dragged and dropped QWebView in the widget. I didn't code anything inside and added QT += webkit in .pro file..

 

Any help ll b  highly appreciated...

 

 

 

Thanks 

Madhan

 


Please use plain text.
Developer
sporadicsoftware
Posts: 72
Registered: ‎09-30-2011
My Device: Bold 9930 & PlayBook
My Carrier: Sprint

Re: Problem with QWebView

Webkit is not supported with Qt yet. If you notice in the build instructrions on the Qnx link, -no-webkit is passed to configure. Of course WebKit will build, it just won't work.

Please use plain text.
Contributor
madhanbalus
Posts: 18
Registered: ‎02-10-2012
My Device: playbook
My Carrier: Airtel

Re: Problem with QWebView

[ Edited ]

Hello sporadicsoftware,

 

         How will i know that QtWebKit is supported in the future?.. I meant shud i do something with my PB device(by upgrading it to newer version of its OS,BTW am running PB OS 2.0 now) to support QtWebkit or it is totally IDE(Qt creator for playbook 4.8) dependant. am confused with am able to successfully compile the apis (QWebview) provided in the IDE but it is not just working fine with the device.. :No:

 

:Helpsmilie:

 

Thanks,

Madhan

 

 


Please use plain text.
Developer
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Problem with QWebView

QtWebKit binaries are not ported/compiled for PB (qnx armv7le) yet. Wait for BB10 and Cascades
Please use plain text.
BlackBerry Development Advisor
RSperanza
Posts: 141
Registered: ‎03-08-2012
My Device: Z10
My Carrier: Bell

Re: Problem with QWebView

Sorry for the delayed reply.

 

I started looking into this for you a few weeks ago and later posters are correct in that QWebView requires some libraries which have not been ported to Playbook yet.  The recommended way to implement a Web view in NDK projects is the WebView component in Cascades, released last week in beta.  However, this will not be available to use on the Playbook until BlackBerry 10 is available on the Playbook and there is currently no date announced for when that will be available.  You can build your app with the new SDK and test it with the simulator that came with that release, which supports both Playbook and Dev Alpha screen sizes in the interim.

 

Please use plain text.
New Contributor
Glawe
Posts: 8
Registered: ‎03-06-2012
My Device: Playbook, 9900
My Carrier: Telenor

Re: Problem with QWebView

There is actually a quite big issue with the webview component for cascades as it only renders a white screen (its also noted in the releasenotes). But i guess its worth waiting for! :smileyhappy:
Please use plain text.
BlackBerry Development Advisor
RSperanza
Posts: 141
Registered: ‎03-08-2012
My Device: Z10
My Carrier: Bell

Re: Problem with QWebView

Hi.

 

The version released last week is not complete.  It is an initial version meant to get something that works into developer hands as early as possible.

Please use plain text.
Contributor
ifor38special
Posts: 17
Registered: ‎07-23-2010
My Device: Blackberry Storm 9530
My Carrier: Verizon

Re: Problem with QWebView

Did any of you now have a WebView Class working in Playbook in OS 10 or even OS 2.0? 

I have OS 10 Beta with Cascade and trying to figure out how to get a WebView Class working.

I have included and using bb::cascade::WebView but not sure how to instance the WebView and if I should

keep Cascase Application code in etc. You have examples?

Please use plain text.
BlackBerry Development Advisor
RSperanza
Posts: 141
Registered: ‎03-08-2012
My Device: Z10
My Carrier: Bell

Re: Problem with QWebView

Here is a QML excerpt that you can paste into the content for a Page in your test app's main.qml:

 

Container {

 

  layout: StackLayout  { }

  

  WebView {

     html: "<html><body style='font-size: 40pt'><p>This is a test. <br/><br/>Please click on this <a href=\"http://www.blackberry.com/\">link</a>.</p></body></html>"

     preferredWidth: 500

     preferredHeight: 350

 

    layoutProperties: StackLayoutProperties {

        horizontalAlignment: HorizontalAlignment.Center

    }

  }

}

 

Hope this helps.

 

Please use plain text.