[Qt-interest] when QWebView load a page without html suffix, It will crash

tang ke tangk at lemote.com
Wed Jun 30 09:02:14 CEST 2010


When I use the QWebView to load a page named "Index" without html
suffix, It will crash.
so I rename the Index to Index.html, then load It,It's OK.

I think maybe It's a bug of QtWebkit


code:

#include <QtGui/QApplication>
#include <QtWebKit/QWebView>

int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QWebView webView;
QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled,
false);
QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled,
false);
webView.setUrl(QUrl("/home/tangke/test")); //crash
// webView.setUrl(QUrl("/home/tangke/test.html")); //ok
webView.show();
return app.exec();
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tangk.vcf
Type: text/x-vcard
Size: 487 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100630/0df110ec/attachment.vcf 


More information about the Qt-interest-old mailing list