[PyQt] segmentation faults common when using QWebView

Hans-Peter Jansen hpj at urpla.net
Mon Nov 29 19:14:50 GMT 2010


On Monday 29 November 2010, 18:30:39 Brandon Craig Rhodes wrote:
> "Hans-Peter Jansen" <hpj at urpla.net> writes:
> > From what I can see, you're missing fundamental concepts of the
> > asynchronous nature of QtWebView. You should control your test flow
> > with signals, instead of a timer, e.g.:
> >
> > 	# you need to wait for finishing the load
> >         self.webview.loadFinished.connect(self.callback1done)
>
> That does not work for the web site I am testing, because
> "loadFinished" is signaled several seconds before the page is
> actually complete - maybe because of how Dojo does things
> asynchronously?  In any event, I could not find a
> "loadWhenDojoCallbacksAreAllFinished" signal, so I went with a timer
> loop instead.  :-)

Why not trigger the timer from the loadFinished signal. That way, you 
get the best of both worlds ;)

Pete


More information about the PyQt mailing list