QtWebkit and hasPendingEvents() always True
Posted
by
Deorf
on Stack Overflow
See other posts from Stack Overflow
or by Deorf
Published on 2010-12-03T21:27:43Z
Indexed on
2010/12/23
3:54 UTC
Read the original article
Hit count: 212
Hello.
I use project webkit2png (slightly appended) to take screenshots in Linux. On the server running the latest version QtWebkit and Python 2.6
On some sites (eg 118114.cn) problem and the application hangs forever. Debug shows that the problem in this code snippet:
while self.__loading:
if timeout > 0 and time.time() >= cancelAt:
raise RuntimeError("Request timed out on %s" % url)
while QApplication.hasPendingEvents():
QCoreApplication.processEvents()
Full version of the source code is available here (lines 270-275)
Somehow Loading-event hangs and hasPendingEvents can not be False.
Most of the screenshots are created normally, but sometimes due to some URL drops my app: (
Does anyone know how to solve this problem and why the event hangs?
© Stack Overflow or respective owner