qwebpage

How to follow a link in QWebKit?

Having a DOM of the following html; <a href="?op=order"> <img class="img_button" src="picture.gif" onMouseOver="this.src='some.gif';" onMouseOut="this.src='some_other.gif';" alt="" border="0"> </a> how to follow a link (href) in QWebKit (specifically QWebPage). Please notice that it's an image that is linked. I can't do it (and...

How to tell QWebPage not to load images?

I'm using QWebPage to load needed site page. But QWebPage loading all additional resources: images, csses, and so on. Is there any way to present this behavior and cancel loading of images? Only idea that I have - to write custom QNetworkConnectionManager, which will return some dummy picture instead of requested. But this looks a bit o...

QWebPage triggers loadFinished() several times

I'm loading content into QWebPage, using load() method. But my loadStarted(), loadFinished() and loadProgress() handlers are calling several times. How can I detect that page is loaded completely with all it's content? ...

QWebElement manipulation of a QWebPage in a separate thread

Hi, I have a QWebPage created in the main thread (you can't create it anywhere else). I would like to manipulate this page using the QWebElement API introduced in Qt 4.6, but in a separate thread. So that thread would acquire a reference to the page and perform the necessary tree walking and attribute changes I need. As the Threads and...

How get a focus element in QWebView/QWebPage?

Hi everyone, i need to be able to react on focus changes in QWebPage. I used microFocusChanged() signal and it gives me almost desirable behavior, but anyway i don't know how to know which element is selected. I want to do some actions when any editable element on page gets or loses focus. Thank you in advance ...

Setting useragent in QWebView

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 = QtWebK...

PyQt4.QtWebKit: QWebPage QWebView set timeout when load stop

Is there any way to say to a QWebPage or to a QWebView stop loading page if some sort of timeout is exceeded? Sultan ...

QWebPage. How to handle failed request.

I want to handle failed requests (for example, with http 404 error code in reply), display my own "notfound.html" page in QWebView. But there is no simple way to handle replies with QWebView/QWebPage classes. As I see in Arora browser, for such requests uses next mechanism: QWebPage::setForwardUnsupportedContent(true), QWebPage::unsuppo...

Does qwebview/qwebpage download contents in a separate thread or in the main/gui thread?

If it doesn't then how can i explicitly force it to download async. in a separate thread? ...

Pyqt save dom to file

Why this code does not work ? I want save dom after js execute at this page and i want use qt without gui. Sorry for my English. #coding:utf-8 from PyQt4 import QtCore, QtWebKit class Sp(): def save(self): print "call" data = self.webView.page().currentFrame().documentElement().toInnerXml() open("htm","w")....