Skip to content

Instantly share code, notes, and snippets.

@jeena
Created November 16, 2012 00:07
Show Gist options
  • Save jeena/4082613 to your computer and use it in GitHub Desktop.
Save jeena/4082613 to your computer and use it in GitHub Desktop.
from PyQt4 import QtCore, QtGui, QtWebKit
class WebViewCreator:
def __init__(self):
self.view = QtWebKit.QWebView()
self.view.setPage(QtWebKit.QWebPage())
self.view.connect(self.view, QtCore.SIGNAL('loadFinished(bool)'), self.load_finished)
path = self.app.resources_uri() + "/index.html"
self.view.load(QtCore.QUrl(path))
def load_finished(self, ok):
print ok
def onDone(ok):
print ok
# The problem is that if I use onDone for the signal then it gets called, but self.load_finished is never called
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment