On Monday 04 April 2011, 00:23:59 Hans-Peter Jansen wrote: > On Sunday 03 April 2011, 22:49:44 Gelonida Gmail wrote: > > Nokia considers this bug not being their problem, but a webkit > > issue. > > > > Therefore I filed a new bug report for webkit. > > > > https://bugs.webkit.org/show_bug.cgi?id=57729 > > Hi Phil, > > I was able to simplify the issue even further, and usually just > clicking on the homepage link on the login page (after logging in) > crashes in the JS core, but now, this code crashes reliable in the > webview.show() line over here: > > import sys > import platform > import PyQt4.QtGui as QtGui > import PyQt4.QtCore as QtCore > from PyQt4.QtWebKit import QWebView > > print sys.platform, platform.release() > print QtCore.PYQT_VERSION_STR,QtCore.PYQT_VERSION > > app = QtGui.QApplication(sys.argv) > webview = QWebView() > urlstr = "http://facebook.com" > webview.setUrl(QtCore.QUrl(urlstr)) > webview.show() > sys.exit(app.exec_())
It's getting stranger and stranger: the crash happens in an interactive python session only. If saved to a file, it's running fine (apart from webkits facebook dysfunction, which prevents a successful login (for me at least with: Qt version: 4.7.1 sip version: 4.12.2-snapshot-ec9807971e08 PyQt version: snapshot-4.8.4-8641ecc135b3 Webkit version: 533.3 Python: 2.6 (linux2, 2.6.31.14-6-desktop) )). Even more streamlined version: import sys from PyQt4 import QtCore, QtGui, QtWebKit urlstr = "http://facebook.com" app = QtGui.QApplication(sys.argv) webview = QtWebKit.QWebView() webview.setUrl(QtCore.QUrl(urlstr)) webview.show() sys.exit(app.exec_()) Attached is a slightly improved variant in python and C++, that would be interesting to get output and feedback on various platforms and versions for (preferably of those, that own a valid facebook account..). Login successful? Crash after click on homepage link? Pete
#include <QtGui> #include <QtWebKit/QWebView> #include <QtNetwork/QNetworkProxyFactory> #define urlstr "http://facebook.com" int main(int argc, char **argv) { QApplication app(argc, argv); QNetworkProxyFactory::setUseSystemConfiguration(true); QWebView *webview = new QWebView(); // javascript is enabled by default //webview->settings()->setAttribute(QWebSettings::JavascriptEnabled, true); webview->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); QStringList args = QCoreApplication::arguments(); QUrl url = QUrl(urlstr); if (args.count() > 1) url = QUrl(args[1]); webview->load(url); webview->show(); return app.exec(); }
webview.py
Description: application/python
CONFIG += qt SOURCES += webview.cc TARGET = webview QT += webkit
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt