I have a QWebView, which works fine. Then, using code from spynner, I attempt to bind the useragent method to a custom method. This appears to work in spynner (with a QWebPage), but not here. Any help much appreciated. Code:
def customuseragent(url):
print 'called for %s' % url
return 'custom ua'
#inside a class
self.webkit = QtWebKit.QWebView()
self.webkit.page().userAgentForUrl = customuseragent
self.webkit.load(QtCore.QUrl('http://www.whatsmyuseragent.com/'))