Questions tagged [qwebenginepage]

44 questions
6
votes
1 answer

Is it possible to render QWebEnginePage/QWebEngineView offscreen?

I have this partially working, but I'm facing several difficulties: 1) It appears that QWebEnginePage requires a QWebEngineView. (see setView() method here: https://code.woboq.org/qt5/qtwebengine/src/webenginewidgets/api/qwebenginepage.cpp.html) 2)…
mpr
  • 3,250
  • 26
  • 44
5
votes
1 answer

How to detect button click inside Qwebengine in pyside2

I wrote an app in pyside2, which opening a webpage in QWebEngine. That web page has 2 buttons, I am not understanding how can I detect a button click in pyside2 app module, I need to perform other operation on that button click. Example below is…
5
votes
0 answers

QWebEnginePage does not know its contents size

I have a very simple application using WebEngineView and I just wanted to resize the widget displaying to the contents of the html file. I'm expecting it to be 30 pixels wide. Instead my program prints QSize(0,0) and even worser the widget is not…
Aleph0
  • 5,816
  • 4
  • 29
  • 80
4
votes
3 answers

Is there any way to call synchronously the method 'toHtml' which is QWebEnginePage's object?

I'm trying to get html code from the QWebEnginePage object. According to Qt reference, QWebEnginePage object's 'toHtml' is asynchronous method as below. Asynchronous method to retrieve the page's content as HTML, enclosed in HTML and BODY tags.…
ko.nyk.93
  • 43
  • 4
3
votes
1 answer

How to save dynamically generated web page in QWebEngineView?

I am loading a web page onto QWebEngineView. A user creates a different kind of tables (reports) and then needs to save those tables to local computer as a web page. Here is what I have tried: Here I use a QWebEnginePage::save() method, but nothing…
Bobur
  • 545
  • 1
  • 6
  • 21
2
votes
1 answer

runJavaScript with callback does not wait for return

I'm just starting out with javascript and Qt so bear with me My issue is with the runJavaScript method. I can't seem to get the callback function to run with a returned value that's delayed. For example, the following prints None. js = ''' function…
Quip13
  • 33
  • 7
2
votes
1 answer

How to execute QWebEngine in Python function

I have a QWebEngine class tor read webpages and create BeautifulSoup for them. Here is the code: import sys from bs4 import BeautifulSoup import os from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets class…
Chan
  • 3,605
  • 9
  • 29
  • 60
1
vote
1 answer

Why my QWebEngineView stucks at instagram loading screen and don't accept inputs like reload

When I run everything works fine except it stops at instagram splash/loading screen, even the right click menu option don't work. Works for PyQt5 but not from PyQt6.There is no problem with internet connection. from PyQt6.QtWidgets import * from…
Akshat
  • 17
  • 4
1
vote
0 answers

QWebEnginePage - how to get access to Media Session API?

Web pages can expose Media Session API, it is using for lock screens notifications and also for changing playing status directly on the page https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API You can see what I mean by playing…
Dibo
  • 1,159
  • 17
  • 34
1
vote
0 answers

QWebengineView : Disable Ctrl+mouse wheel

Is it possible to disable zooming(ctrl+mousewheel) of html content loaded in QWebEngineView. I tried qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--enable-blink-features=ShadowDOMV0,CustomElementsV0,--disable-pinch"); it is not working. Note: We are…
Akshay R
  • 47
  • 6
1
vote
0 answers

Bet365.com is not loading in QWebEngineView

class MyWebEngineUrlRequestInterceptor(QWebEngineUrlRequestInterceptor): def __init__(self, parent=None): super().__init__(parent) def interceptRequest(self, info): print("interceptRequest") …
1
vote
0 answers

How to intercept response headers in QWebEnginePage

I try to intercept response headers of displayed page in QWebEnginePage. I have saw this post Capture server response with QWebEngineView, but only URL is returned. So is there a way to retrive response header in QWebEngine? Or if not is there an…
CyrilCC
  • 21
  • 1
1
vote
1 answer

Save and load QWebEngineHistory to a QWebEnginePage

I need to save the history of a QWebEnginePage and load it back. Therefore I want to store the history from page A in some structure and set it to page B. In the documentation I found the following methods: // Saves the web engine history history…
Vanessa
  • 49
  • 8
1
vote
0 answers

PyQt5 QWebEngineView window won't show

I wrote a simple test program to load a URL in a QWebEngineView. The program works on Mac; the browser pops up and I can see the webpage. But on Windows 7, the browser window never appears after I call show(): import sys from PyQt5.QtWidgets import…
std_answ
  • 1,039
  • 1
  • 11
  • 17
1
vote
0 answers

How to add new tab function in PyQt5 and python web browser

I'm making a web browser in PyQt5 and Python I want to add [open new tab] feature. I'm using QWebEnginePage.createWindow but I don't know how to do this. class MainWindow(QMainWindow): def __init__(self, *args, **kwargs): super(MainWindow,…
1
2 3