PyQT open a web page with JS alert pop up will get SegFault. How to fix that?

I am learning PyQT programing, and when I try a simple test, I get Segmentation fault, here is my code pop.py:

#! /usr/bin/python

import sys
from PyQt4.QtGui import QApplication
from PyQt4.QtCore import QUrl
from PyQt4.QtWebKit import QWebView

app = QApplication(sys.argv)
v = QWebView()
v.load(QUrl("http://127.0.0.1/j.html"))
v.show()
app.exec_()

I started an Apache server at 127.0.0.1 for testing. And here is j.html:

<html><script>alert("I am here");</script>
<body>Hello World</body>
</html>

I start the pop.py, open a window, javascript popup alert dialog, I click the OK, then pop.py will quite and get “Segmentation fault”

I tried PySide, get same result. If not JS alert in html, will be OK. Is this a bug of QT or I missed something?

I worked on Debian with python 2.6.6, python-qt4 4.8.3, libqtwebkit4 2.1.0

I also tried Fedora 15 with PyQt4-4.8.3, python 2.7.1, same issue

Any suggestion, clue for searching will be helpful. Thanks

Open Pop UP window through alert box

I want to open a pop up window, by clicking ok button in JavaScript. I.e., I am showing some alert message in my jsp page, when I am clicking alert box automatically, a pop up window have to open, I a

In page load how to open a new pop up

This Jquery open in a pop up how can i open this in new tab <script src=http://code.jquery.com/jquery-latest.min.js type=text/javascript></script> <script type=text/javascript &gt

how to open a pop-up page in rails 3 and load data from database

I am using ruby-on-rails + psql I have list of pages. On some page click I have to open page in pop-up. How I’ll load data in that pop-up for specific page.

How to open multiple pop up browser windows from ActionScript?

How to open multiple pop up browser windows from ActionScript?

open pop-up box when open page

i have code bu ajax like this : $(document).ready(function (){ $(.open_popup).colorbox({width:580px, inline:true, href:#subscribe_popup}); }); this is pop up box, i need when open page open

Alert pop up with LWUIT

How to create the pop up window using LWUIT? I want to show an alert and that alert automatically dispose after 5 to 10 sec’s. How to do this with LWUIT?

How do I pop up an alert in Javascript?

How do I pop up an alert in Javascript? I tried alertHELLO but that didn’t work. Can someone tell me the correct syntax? Oh by the way I downloaded the JavaScript exe from my favorite site.

Pop UP alert message from c# page

I need to show a pop up alert when some fileds have got not null values. I Used code piece like below , but not working correctly..Could you pls let me know the corrcet syntax for doing that? if (txt

How to open a pop-up page and render a JSF Response?

I am using JSF 1.2 without any component libs for a JSF Application. Consider a case where I have a JSF rendered page and on click of a link in that page,a pop-up page should open and show some detail

Prevent scroll of the page if pop-up is open

I am using the jquery mobile pop up. This is inside the page. There is an image that opens this pop-up. Now how do I prevent the entire page from scrolling only if the pop-up is open and allow scrolli

Answers

This works with the test case given above for

Qt:     4.7.2
PyQt:   4.8.3 or PySide 1.0.1
Python: 2.7.1

As noted above in the comments, http://developer.qt.nokia.com/forums/viewthread/4760 explains the bug and it is reported as fixed from https://bugs.webkit.org/show_bug.cgi?id=57414 and was probably included in Qt 4.7.2.