Questions tagged [qwebpage]

The QWebPage class, part of the Qt framework, provides an object to view and edit web documents.

QWebPage holds a main frame responsible for web content, settings, the history of navigated links and actions. This class can be used, together with QWebFrame, to provide functionality like QWebView in a widget-less environment.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

84 questions
17
votes
3 answers

How to tell QWebPage not to load specific type of resources?

How to tell QWebPage not to load specific type of resources like js, css or png?
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
16
votes
4 answers

How to know when a web page is loaded when using QtWebKit?

Both QWebFrame and QWebPage have void loadFinished(bool ok) signal which can be used to detect when a web page is completely loaded. The problem is when a web page has some content loaded asynchronously (ajax). How to know when the page is…
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
7
votes
2 answers

Create whole page screen shot using QWebPage

I am using Qt (the fancy browser example with the Qt creator) to create a screen shot of web pages using this code (taken and converted from here): QImage *image = new QImage(view->page()->mainFrame()->contentsSize(),…
Omid Kamangar
  • 5,768
  • 9
  • 40
  • 69
6
votes
2 answers

QWebView vs QWebPage

The documentation (in PyQt at least) for QWebView says: 'The QWebView class provides a widget that is used to view and edit web documents', whereas QWebPage says: 'The QWebPage class provides an object to view and edit web documents'. Given that…
ChrisW
  • 4,970
  • 7
  • 55
  • 92
6
votes
1 answer

Scrape multiple urls using QWebPage

I'm using Qt's QWebPage to render a page that uses javascript to update its content dynamically - so a library that just downloads a static version of the page (such as urllib2) won't work. My problem is, when I render a second page, about 99% of…
Jessie
  • 2,319
  • 1
  • 17
  • 32
6
votes
3 answers

How to follow a link in QWebKit?

Having a DOM of the following html; how to follow a link (href) in QWebKit…
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
5
votes
1 answer

PyQt: how to use QWebPage with an anonimous proxy

This is driving me crazy. I want to show in a QWebPage an url, but i want to do it passing by an anonimous proxy. Code #setting up the proxy proxy = QNetworkProxy() proxy.setHostName("189.75.98.199") #just examples proxy.setPort(1111) proxy.setType…
apelliciari
  • 8,241
  • 9
  • 57
  • 92
5
votes
1 answer

How to read data from QNetworkReply being used by QWebPage?

I use QWebPage to download a webpage as well as all its resources. At the same time I'd like to get hold on raw data being downloaded by Qt during this process. Doing this by reading data from QNetworkReply in void…
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
5
votes
2 answers

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…
Matt
  • 51
  • 1
  • 3
4
votes
6 answers

how to use QWebPage in a non-GUI application

I want to use QWebPage in a non-GUI Qt application. By that, I mean that I don't want to communicate with the window server at all. Using QtGui is not a problem, though. QWebPage internally creates some QWidget instances. Thus, using…
Albert
  • 65,406
  • 61
  • 242
  • 386
4
votes
0 answers

QtWebKit stops parsing after script block

I'm having problems with QWebFrame::setContent, it looks like it fails to parse the HTML from qt-project.org until I remove the following block from
(it just stops there and ignores the rest):