You are not logged in.

1

Tuesday, March 16th 2010, 8:46pm

Tip: Having problem with hanging application when using QWebView?

If you encounter problems with hanging application (app not exits when last window closed) please note QWebView is probably buggy but there is one simple workaround. Disable JavaScript - this helps.

Source code

1
webView->settings()->setAttribute(QWebSettings::JavascriptEnabled, false);



Try it - open the fancybrowser from the example, load some complicated page and try to close the app when QWebView is rendering. The app will hang - on Windows and on Linux too.

Disable the JavaScript and try again. Whoooa!

2

Wednesday, March 17th 2010, 9:12am

I am facing some similar problems. If I try to display a site using some java script the application hang and crashes without any error report neither on the console nor via Qt logmessages.

It's all fine if I switch of java script but I do need to handle the scripts. I figured out, that the application hangs somewhere in WTF::dtoa() which is called in UString::from(double d).

So what can I do. Do I really have to update my Qt version again and is the problem already solved or to I anything wrong? I run the Qt verion 4.6.2 on a windows system.

This code ends in a hang and crash of my program

Source code

1
2
3
QWebView *view = new QWebView(parent);
view->load(QUrl("http://qt.nokia.com/"));
view->show();


This code works fine.

Source code

1
2
3
4
QWebView  *view = new QWebView(parent);
view->load(QUrl("http://qt.nokia.com/"));
view->show();
view->settings()->setAttribute(QWebSettings::JavascriptEnabled, false);

Rate this thread