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
1
vote
1 answer
QWebPage and multithreading
I have this code:
class TestThread : public QThread
{
public:
void run()
{
QFile file("test.html");
file.open(QIODevice::ReadOnly);
QWebPage page;
page.mainFrame()->setHtml(file.readAll());
qDebug() <<…

brainstream
- 451
- 4
- 17
1
vote
1 answer
How to create Web History for my Browser
I'm new to Qt. I am Trying to create a Sample Browser Application. I had created the Browser application. Now i need to create the Web history for my application. I don't know how to do it. can anyone please help me with this.
Thanks in advance.

New Moon
- 787
- 6
- 21
- 35
1
vote
1 answer
QWebPage not working after the first load
I'm writing an application that scrapes some web pages using QWebPage. I'm having some trouble when the response is a Http redirect (e.g 302, 303, etc). The QWebPage simply does not follow the redirect.
To work around this issue I've connected to…

Raphael
- 7,972
- 14
- 62
- 83
0
votes
1 answer
Download a file using qwebkit
Good day to all. I started using X. I don't want to surf websites only, but download files too. What should I add to the code, to let it just download the file in a directory without any dialog window.
#!/usr/bin/env python
# -*- coding: utf-8…

Ivan
- 1
- 2
0
votes
3 answers
How to change qwebview's background image, color and font color
I want to change my webview's background image, color and font color. I tried setBackgroundRole method but it only have few color. It doesn't have the color that I want. And I don't find how to set font color and background image. Do you have any…

Eagle King
- 153
- 1
- 2
- 7
0
votes
1 answer
ImportError: cannot import name 'QtWebKitWidgets' from 'PyQt5'
I created a Window on Qt with Qt Designer and when I launch that app - I get ImportError. It feels like that library doesn't installed in my system. But the preview works in Qt Designer.
Full code of design file:
# -*- coding: utf-8 -*-
# Form…

Okno
- 71
- 1
- 1
- 4
0
votes
0 answers
Python3 PyQt5. How can I run the PyQt window method from the main process?
How can I run the PyQt window method MainWindow.load_url() from the main process?
from multiprocessing import Process
import sys
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QMainWindow
from PyQt5.QtCore import *
from…

Kap
- 35
- 4
0
votes
1 answer
all webcontent to string
First of all, I don't even know how to begin, QtWebKit is the first time i need in qt.
What I'm after is to realt a contant of webpage https://bla.com/something.php
the webpage will contain only one word, so no worries about the content
and this…

Jiri Zaloudek
- 326
- 3
- 19
0
votes
1 answer
In Qt QwebKit how can I delete all cookies when starting?
I implemented the cookies jar as shown in the web, and I can receive all the cookies values;
but how can I delete all cookies I don't understand? Here is my code where can I trigger the delete all cookies and how?
#include
…

user63898
- 29,839
- 85
- 272
- 514
0
votes
0 answers
PyQt5 listen to javascript event inside QWebView to be used with python
I have a web app inside a QWebView in a python code, this html/javascript code have a button with a click event, I would like to get that event once is triggered so it can be used for an aplicacion outside the QWebView.
tl;dr: is there a way to…

Thriskel
- 351
- 3
- 13
0
votes
1 answer
PyQt QWebkitWidgets not displaying web page when called from command line or object constructor
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebKit import *
from PyQt5.QtWebKitWidgets import *
from PyQt5.QtWidgets import QApplication, QWidget,…
0
votes
0 answers
pyqt4 javascript evaluate redirect loadfinished
I have the following that opens an initial url. Once opened javascript is evaluated and a button is clicked resulting in the browser redirecting to a new url. I would like to execute self.web.loadFinished.connect(t) each time the browser is…

the_big_blackbox
- 1,056
- 2
- 15
- 35
0
votes
0 answers
PyQt4: take screenshot of web pages using QWebKit
I am using the below code to take screenshot from a webpage. But the problem is I am getting blank screenshot for certain websites. Obviously the reason is the page size is not fitting. Can some one please help me to fix this code so that it works…

Andy
- 405
- 1
- 5
- 16
0
votes
2 answers
How to display a QImage in QWebKit?
Is there any way to display a QImage (in memory, not on filesystem) in a QWebFrame without writing the image out to a temporary file?

Aaron
- 423
- 1
- 4
- 12
0
votes
1 answer
How do I make QtCreator 4.2.2 include webkit related files
I've pretty much tried every proposal on solving this question that's on the entire internet but to no avail.
I'm using Qtcreator 4.2.2 on Windows 10, trying to make a program that must use a webview (of any kind) -- so far, I've tried using the…

Clearer
- 2,166
- 23
- 38