qtwebengine

QWebEngineView crashes on load() or page() method

♀尐吖头ヾ 提交于 2019-12-22 08:17:15
问题 I'm working on porting a Qt 5.5, QWebView project to Qt 5.6 (beta), QWebEngine. I've gone through the porting guide here. My code looks like this: .h file defines _view like so: QWebEngineView* _view; and the .cpp constructor (class inherits from QWidget) has: QVBoxLayout* vbox = new QVBoxLayout(this); _view = new QWebEngineView(this); connect(_view, SIGNAL(loadFinished(bool)), this, SLOT(loadPageFinished(bool))); QString webDir = getReportBasePath() + no_tr("/index.html#") + startingPage; //

How to build Qt (with QtWebEngine support) using meta-toolchain-qt5?

邮差的信 提交于 2019-12-22 08:01:53
问题 I am trying to build Qt using meta-toolchain-qt5 , but when I do this via poky-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-vfp-vfpv4-neon-toolchain-2.0.1.s‌​‌​h , I don't see anything about QtWebEngine in the sysroot directory. I also tried to build Qt using the following command bitbake meta-toolchain-qt5 but it is the same result; I don't have anything regarding Qt WebEngine. How can I build Qt with QtWebEngine support? 回答1: Looking at meta-toolchain-qt5 it inherits populate_sdk_qt5 , which

QWebEngineView modify web content before render

自闭症网瘾萝莉.ら 提交于 2019-12-22 01:29:50
问题 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, too). I get html content by page()->toHtml then set it back by setHtml , but content rendered don't like original (seems to loss format) Thanks for help! 来源: https://stackoverflow.com/questions/38162751/qwebengineview-modify-web-content-before-render

Running simple QtWebEngine app on Raspberry Pi 2, page not showing

梦想的初衷 提交于 2019-12-21 22:35:09
问题 I compiled and installed QtWebEngine + QML plugins on Raspberry Pi 2 with Yocto recipes using information in this tutorial using Yocto dizzy branch and run the following script: root@raspberrypi2:~# more chromium.qml import QtQuick 2.1 import QtQuick.Controls 1.1 import QtWebEngine 0.9 ApplicationWindow { width: 1280 height: 720 color: "lightgray" visible: true WebEngineView { id: webview url: "file:///home/root/hello.html" anchors.fill: parent } } Note that the IMPORT VERSION 0.9, not 1.0 I

QWebEngineView update with pdf path

只谈情不闲聊 提交于 2019-12-20 04:13:25
问题 I have a QtWebEngineWidgets showing some pdf files. I want to change pdf and force QtWebEngineView display automatically and dynamically. The problem I get is the QtWebEngineWidgets does not update, incapabile to display when pdf file path changes. class PdfReport(QtWebEngineWidgets.QWebEngineView): PDFJS = 'file:///pdfjs/web/viewer.html' def __init__(self, parent=None): super(PdfReport, self).__init__(parent) self.PDF = 'file:///Technicalreport/file0.pdf' self.load(QtCore.QUrl.fromUserInput(

How To Build Qt WebEngine for PyQt5?

左心房为你撑大大i 提交于 2019-12-19 18:28:18
问题 Qt WebEngine This link show python wrapper for Qt WebEngine . Please can canyone tell me how can i add this in pyqt5 environment? Thanks!!! 回答1: It seems I got it working: Either install pyqt version 5.10, which still ships the web engine, either install a newer (I use 5.12) and install PyQtWebEngine separately. pip3 install PyQtWebEngine Now these imports work: from PyQt5.QtWebEngineWidgets import QWebEnginePage from PyQt5.QtWebEngineWidgets import QWebEngineView I can't tell you the whys, I

Use PyQt5.QtWebEngineWidgets on Windows: is it possible?

与世无争的帅哥 提交于 2019-12-19 12:02:01
问题 I am trying to build an app in PyQt5 (version 5.6+) in Python 3.6. It contains a web browser, using QtWebEngineWidgets. It works fine on Mac, however, there are problems on Windows. When I run the code on Windows and import the module: from PyQt5 import QtWebEngineWidgets I get the following error: ImportError: cannot import name 'QtWebEngineWidgets' Now, reading some forums it looks like PyQt5.QtWebEngineWidgets is not available for Windows, yet. Is it correct? How can I have a web browser

Use PyQt5.QtWebEngineWidgets on Windows: is it possible?

£可爱£侵袭症+ 提交于 2019-12-19 12:01:34
问题 I am trying to build an app in PyQt5 (version 5.6+) in Python 3.6. It contains a web browser, using QtWebEngineWidgets. It works fine on Mac, however, there are problems on Windows. When I run the code on Windows and import the module: from PyQt5 import QtWebEngineWidgets I get the following error: ImportError: cannot import name 'QtWebEngineWidgets' Now, reading some forums it looks like PyQt5.QtWebEngineWidgets is not available for Windows, yet. Is it correct? How can I have a web browser

Capture server response with QWebEngineView

十年热恋 提交于 2019-12-17 19:56:02
问题 I'm trying to create a Dialog in Qt which loads a URL (which I do not want to expose to the end-user, hence a Dialog). Once the user has entered their credentials on the page, the server returns a redirect URL which I want to capture. How can I do this? QtWebkit made this easy to do as QWebView had a QNetworkAccessManager object. But with QtWebEngine, the QWebEngineView class does not have this capability. The former also allowed HTTP headers to be set for any requests by using the

How to send HTTPHeader using QT WebEngine?

 ̄綄美尐妖づ 提交于 2019-12-14 03:57:32
问题 I was playing around with QT WebEngine to make a desktop web browser which suits my requirements while working. Unfortunately, I need send some data with the HTTP Header to a site. I came across QWebEngineUrlRequestInfo class' void QWebEngineUrlRequestInfo::setHttpHeader(const QByteArray &name, const QByteArray &value) method but I don't really know how to use it in code. This is my code so far: import QtQuick 2.7 import QtQuick.Window 2.2 import QtQuick.Controls 2.0 import QtWebEngine 1.3