Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.15.4
Description
- open simplebrowser Qt example
- replace QMenu *BrowserWindow::createHelpMenu() with the following code:
QMenu *BrowserWindow::createHelpMenu() { QMenu *helpMenu = new QMenu(tr("&Help")); helpMenu->addAction(tr("About &Qt"), qApp, [=]{ auto webView = currentTab(); QPoint p (30, 200); QAtomicInt test = -1; webView->page()->runJavaScript(QString("window.scrollTo(%1, %2);").arg (p.x()).arg(p.y()), [&test] (const QVariant &) {test = 1;}); while (test == -1) { // Hack: javascript calls are asynchronous - thus we must wait here while exluding mouse events QApplication::processEvents (QEventLoop::ExcludeUserInputEvents); } }); return helpMenu; }
- run the application
- open a pdf document
- run "About Qt" from the Help menu
5.15.3: It scrolls the PDF document
5.15.4: it doesn't do anything
May be related to this change:
https://code.qt.io/cgit/qt/qtwebengine.git/commit/?h=5.15.4&id=8f56ea6806d9a72d4b705da5f6f90fa5a6873567
The PDF loading seems to be different:
5.15.3:
<embed id="plugin" type="application/x-google-chrome-pdf" src="file:///home/kapinter/Documents/Service%20cloud%20kickoff%2021012021.pdf" stream-url="file:///home/kapinter/Documents/Service%20cloud%20kickoff%2021012021.pdf" headers="" background-color="0xFF525659" top-toolbar-height="56" javascript="block" full-frame="">
5.15.4:
<embed name="8C44FA78F0EDA95829EEE8D6CEFA6D22" style="position:absolute; left: 0; top: 0;" width="100%" height="100%" src="about:blank" type="application/pdf" internalid="8C44FA78F0EDA95829EEE8D6CEFA6D22">
Attachments
Issue Links
- mentioned in
-
Page Loading...