The QtWebKit module, part of the Qt framework, provides a web browser engine as well as classes to render and interact with web content.
Questions tagged [qwebkit]
150 questions
4
votes
1 answer
What are the advantages of using QGraphicsWebView over QWebView?
Apologies if this question is grounded in misconception. I'm new to both webkit and Qt.
I'm trying to get a feel for what circumstances would justify using a QGraphicsWebView instead of a simple QWebView object. I understand one is more complicated…

Username Obfuscation
- 769
- 1
- 5
- 24
4
votes
1 answer
QWebView's memory (cache) management
Here is the code that downloads the same page 10 times:
app = QApplication([])
event = threading.Event()
def load(url):
def _load_finished(ok):
event.set()
web_view = QWebView()
web_view.loadFinished.connect(_load_finished)
…

AlexP
- 1,416
- 1
- 19
- 26
3
votes
1 answer
What is the difference between QWebkit QWebSettings cache and QNetworkManager QNetworkDiskCache?
There are web attributes (void QWebSettings::setAttribute(WebAttribute attribute, bool on)):
QWebSettings::LocalStorageDatabaseEnabled
QWebSettings::OfflineWebApplicationCacheEnabled
QWebSettings::OfflineStorageDatabaseEnabled
There are also…

user1180567
- 175
- 1
- 2
- 8
3
votes
1 answer
Why QWebkit doesn't resolve file:// and qrc:// when used in -webkit-scrollbar css?
Example #1:
::-webkit-scrollbar-button {
background-image: url(file:///tmp/bg.png);
}
Example #2:
::-webkit-scrollbar-button {
background-image: url(qrc://bg.png);
}
Above examples are working only when QWebPage shows local html page. For…

user1180567
- 175
- 1
- 2
- 8
3
votes
2 answers
How can I make QWebView/QWebPage default to serif font?
Using PyQt4, I create a QWebView and then load it with its setHtml() method. The HTML is displayed correctly in most respects but always using the default sans-serif font.
When the identical HTML plain text is loaded by an external browser e.g.…

user405
- 579
- 7
- 13
3
votes
2 answers
How to stop QHttp/QtWebKit from caching pages
Recently I found that I could modify a txt file that's stored online and when I then fetch it using QHttp I'm still getting the previous version. My code also used QtWebKit so maybe this relates to the problem somehow? Or maybe I'm just missing a…

Rok
- 2,568
- 4
- 26
- 28
3
votes
1 answer
QWebKit linkClicked signal never fires
import sys
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtWebKit import QWebView
app = QApplication(sys.argv)
web_view = QWebView()
def url_changed(url): print 'url changed: ', url
def link_clicked(url): print 'link clicked:…

Jesse Aldridge
- 7,991
- 9
- 48
- 75
3
votes
0 answers
QWebEngineView modify web content before render
I have three questions about QWebengineView (Qt 5.7.0):
How can I modify the web content (add extra html/javascript) during load (before render)
How can I get events when javascript resource included in webpage is loading ( I want to modify them,…

lemta
- 211
- 3
- 8
3
votes
1 answer
Webkit_server (called from python's dryscrape) uses more and more memory with each page visited. How do I reduce the memory used?
I am writing a scraper using dryscrape in python3. I am trying to visit hundreds of different urls during a __scraping __session and click through about 10 ajax pages on each url (without visiting a different url per ajax page). I need something…

under_the_sea_salad
- 1,754
- 3
- 22
- 42
3
votes
0 answers
How to download resources of a webpage using QWebPage?
When QWebPage loads a page, it sends requests for all the objects in the page (images, js, css). I want to save these objects to separate files and not just to show them on QWebView.
As mentioned in How to read data from QNetworkReply being used by…

user3335391
- 31
- 3
3
votes
1 answer
Multiple process in WebKit (or equivalent)
In the Google Chrome each tab (or window/gui) is a different process (not only the tabs, but also plugins, extensions, etc.).
How can I make something like multi-process in Qt+WebKit?
Note: No need to be multi-threaded or multiple-process, only…

Protomen
- 9,471
- 9
- 57
- 124
3
votes
2 answers
Qt/PyQt: How do I act on QWebView/QWebPage's "Open in New Window" action?
If I have an open QWebView, I like its default context menu with "Open in New Window" as an option for links. However, I can't seem to find a way to act when the user requests a link be opened in a new window. Overriding the QWebPage.createWindow…

Ken Kinder
- 12,654
- 6
- 50
- 70
3
votes
2 answers
PyQt QWebkit Javascript Function.bind does not exist (ECMAScript 5 missing functions)
Javascript in a web application runs the following loop:
for (var name in this) {
if(typeof(this[name]) == "function") {
if((/^on_|^do_/).test(name)) {
console.debug("Adding ", name, " to ", this, "(", this[name],…

EB.
- 3,383
- 5
- 31
- 43
3
votes
1 answer
Permanent cookies with QWebKit -- where to get the QNetworkAccessManager?
I need to store cookies persistently in an application that uses QWebKit. I understand that I have to create a subclass of QNetworkCookieJar and attach it to a QNetworkAccessManager. But how do I attach this QNetworkAccessManager to my QWebView or…

Nova
- 2,623
- 4
- 26
- 45
2
votes
1 answer
QWebKit + XPath + HTML. Is it possible?
Is it possible to parse HTML (HTML/HTML5, not XHTML) pages using XPath and Qt classes of QWebkit (and probably other standard or Qt classes) without using any external utilities like tidy?
Thanks a lot!

Zarathustra
- 115
- 2
- 8