Details
Description
Steps to reproduce:
- Launch simplebrowser example
- Point it to https://fr.w3docs.com/tools/code-editor/1805
- Try to scroll the PDF page on the right - appears to be frozen
Note warnings
js: Blocked autofocusing on a form control in a cross-origin subframe. js: Blocked autofocusing on a form control in a cross-origin subframe. [51329:51329:0128/140711.052560:ERROR:extension_function_dispatcher.cc(487)] Permission denied for metricsPrivate.recordValue js: Unchecked runtime.lastError: Access to extension API denied. js: Uncaught (in promise) TypeError: Cannot read property 'getStrings' of undefined js: Uncaught Error: Assertion failed
Displaying a PDF works good using QWebEngine when the PDF is the source of the page.
If I try to display a PDF in a iFrame, the viewer is shown but it looks frozen, I can't interact with scroll bars or zoom
Sample test page : https://fr.w3docs.com/tools/code-editor/1805
attached sample code used
import sys from PySide2 import QtCore, QtWidgets, QtWebEngineWidgets class Widget(QtWidgets.QWidget): def __init__(self): super(Widget, self).__init__() lay = QtWidgets.QVBoxLayout(self) self.browser = QtWebEngineWidgets.QWebEngineView() settings = self.browser.settings() settings.setAttribute(settings.PluginsEnabled, True) settings.setAttribute(settings.PdfViewerEnabled, True) lay.addWidget(self.browser) self.browser.setUrl(QtCore.QUrl("https://fr.w3docs.com/tools/code-editor/1805")) if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) view = Widget() view.showMaximized() sys.exit(app.exec_())
For information, there's the same problem using PyQt5 5.15.2, so the problem could be on Qt5 side