qwebengineview

Qt Event Propagation in QWebEngineView

天大地大妈咪最大 提交于 2020-02-16 05:48:03
问题 I have a function named generate_input_event . I'm trying to use this function to simulate a keypress within a QWebEngineView. def generate_input_event(window_id, key_code, modifiers, low_level_data, x, y): modifiers_flag = create_modifiers_flag(modifiers) logging.info("generate input, window: {} code: {}, modifiers {}".format( window_id, key_code, modifiers_flag)) event = QKeyEvent(QEvent.KeyPress, key_code, modifiers_flag) event.artificial = True event_window = window.get_window(window_id)

Why does my PyQt code not execute totally when multithreading?

故事扮演 提交于 2020-01-30 07:42:25
问题 I'm trying to write a web scraper using PyQt5 and multithreading so that I can scrap multiple urls in parallel (i'm aware of this : Scrape multiple urls using QWebPage but I really want to write a parallel version and really can't see why it doesn't work) I've written this code : python import sys from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtWebEngineWidgets import QWebEnginePage import time urlb = "https://www.google.fr/" class Worker

Qt5-QML: automatic authentication username and password with on a third party device

喜夏-厌秋 提交于 2020-01-25 04:14:26
问题 After understanding how to integrate JavaScript functions into Qt-QML I am now trying to apply what I have learned in my previous post to a small real world example in my lab. I am trying to access to my robots via wi-fi using using a third party device present in my lab. I have a log-in form provided by the device as shown in the print screen given below. The address is, for example, https://123.456.789.123:7878 (which I made up but it is for understanding the idea): After navigating the

Qt 5.8 and Pdf.js error

China☆狼群 提交于 2020-01-21 23:02:21
问题 I have a problem with pdf.js and Qt 5.8, i tried to do the same code in this link Using pdf.js with Qt5.8 in my application but he doesn't work i dont know why, qt show me this message about JS : "js: Uncaught TypeError: Cannot read property 'PDFJS' of undefined". this is my code in mainwindow : QWebEngineView *view; QString pdfFileURL; QString pathToPDFjs = QString("file:///"+qApp->applicationDirPath()+"/libraries/PDF/viewer.html"); pdfFileURL = "file:///C:/Users/Administrateur/Desktop/CV

Qt 5.8 and Pdf.js error

陌路散爱 提交于 2020-01-21 23:02:07
问题 I have a problem with pdf.js and Qt 5.8, i tried to do the same code in this link Using pdf.js with Qt5.8 in my application but he doesn't work i dont know why, qt show me this message about JS : "js: Uncaught TypeError: Cannot read property 'PDFJS' of undefined". this is my code in mainwindow : QWebEngineView *view; QString pdfFileURL; QString pathToPDFjs = QString("file:///"+qApp->applicationDirPath()+"/libraries/PDF/viewer.html"); pdfFileURL = "file:///C:/Users/Administrateur/Desktop/CV

Qt 5.8 and Pdf.js error

时光总嘲笑我的痴心妄想 提交于 2020-01-21 23:01:38
问题 I have a problem with pdf.js and Qt 5.8, i tried to do the same code in this link Using pdf.js with Qt5.8 in my application but he doesn't work i dont know why, qt show me this message about JS : "js: Uncaught TypeError: Cannot read property 'PDFJS' of undefined". this is my code in mainwindow : QWebEngineView *view; QString pdfFileURL; QString pathToPDFjs = QString("file:///"+qApp->applicationDirPath()+"/libraries/PDF/viewer.html"); pdfFileURL = "file:///C:/Users/Administrateur/Desktop/CV

Qt5 and QML: How to automatically input username and password using WebEngine Quick Nano Browser

二次信任 提交于 2020-01-15 08:23:10
问题 I am writing a small application using Qt and QML that uses the example in the Qt documentation WebEngine Quick Nano Browser. In this example I am trying to access to my email. I can do it, but I am trying to enter username and password automatically so that I can instantly log into my emails. Basically as an example, after launching the application (my email address is hard-coded) I can see the username page of gmail , but here I have to type my username to access to the next page that has

Qt5 and QML: How to automatically input username and password using WebEngine Quick Nano Browser

半世苍凉 提交于 2020-01-15 08:22:07
问题 I am writing a small application using Qt and QML that uses the example in the Qt documentation WebEngine Quick Nano Browser. In this example I am trying to access to my email. I can do it, but I am trying to enter username and password automatically so that I can instantly log into my emails. Basically as an example, after launching the application (my email address is hard-coded) I can see the username page of gmail , but here I have to type my username to access to the next page that has

Grant access to Cam & Mic using Python for PyQt WebEngine

北战南征 提交于 2020-01-05 07:35:35
问题 I am building a simple web app called from Python. I am using the below code. What is the easiest way to programatically grant access to the Cam & Mic when this page is loaded? I have only found C++ examples on the web and cannot find a way to do this within Python code. from PyQt5.QtWidgets import QApplication from PyQt5.QtWebEngineWidgets import QWebEngineView from PyQt5.QtCore import QUrl app = QApplication([]) view = QWebEngineView() view.load(QUrl("https://test.webrtc.org/")) view.show()

How to take webpage screenshots using QWebEngineView without opening window

可紊 提交于 2019-12-24 14:18:21
问题 I'm looking for a way to take website screenshots with QWebEngineView . The main goal is to develop a headless screencapture application that runs in the background. I've managed to get a minimal working example to work (see this for example). However, these examples require that the QWebEngineView widget is made visible, either with calls to QWebEngineView::show() , QWebEngineView::showMinimized() or even QWebEngineView::setVisible(true) , to be able to take a screen capture of a website. As