qwebview

QT5 Video render error code 80040218

烂漫一生 提交于 2019-11-28 14:06:28
When running an application in QT5 made ​​using the QWebView , I accessed a page with a video player in HTML5 , but the video does not play and qt/directshow shows the following error: DirectShowPlayerService::doRender: Unresolved error code 80040218 DirectShowPlayerService::doRender: Unresolved error code 80040218 Details: QT5.1.1 MingW4.8 32bit Windows 7 64bit I suspect that is why my Windows is 64bit , but the QT/MingW * runs on 32bit and maybe miss some DLL/LIB . How can I resolve this? Thanks. The error code is rather generic: 0x80040218 VFW_E_CANNOT_RENDER "No combination of filters

Can QWebView load images from Qt resource files?

廉价感情. 提交于 2019-11-28 13:27:02
I've bundled some HTML and PNGs in my Qt app's resources file (for the help system). Unfortunately I can't find a way for the HTML to display images. I've tried various combinations of the QWebView 's base URL, and different URLs for the <img> tag but none have worked so far. To be clear, I want to be able to do something like this: QString html = "<html><img href=':/resources/cat.png'/></html>"; myWebView->setHtml(html, ???); Is this possible? Try your resource format as: qrc:/resources/cat.png instead of :/resources/cat.png we have .css files that use images in such a format within webview

How to send artificial QKeyEvent to QWebEngineView?

青春壹個敷衍的年華 提交于 2019-11-27 23:52:18
问题 Context: I'm creating a small web browser with a custom on-screen keyboard. It was working almost fine with Qt WebKit ( QWeb* classes) but there were crashes attributed to bugs in WebKit... which won't be fixed after Qt 5.4.0 since they're moving to Qt WebEngine. So I decided to move the stuff to Qt WebEngine ( QWebEngine* classes), following the short webkit->webengine transition guide. Following the caveat section on QWebElement , I have worked my way around showing/hiding the on-screen

Qt QWEBview JavaScript callback

旧时模样 提交于 2019-11-27 18:52:57
How to pass a function "pointer" from JavaScript to a slot? in JavaScript: function f1() { alert("f1"); } qtclass.submit(f1); and in Qt: public slots: void submit(void * ptr) { (void)ptr; } I need the "f1", function to get fired in the JavaScript from the c++, once some processing is done. Also I do not know in advance the name of the function pointer. you should be able to execute your script using QWebFrame::evaluateJavaScript method. See if an example below would work for you: initializing webview: QWebView *view = new QWebView(this->centralWidget()); view->load(QUrl("file:///home//test

QT5 Video render error code 80040218

十年热恋 提交于 2019-11-27 07:56:50
问题 When running an application in QT5 made ​​using the QWebView , I accessed a page with a video player in HTML5 , but the video does not play and qt/directshow shows the following error: DirectShowPlayerService::doRender: Unresolved error code 80040218 DirectShowPlayerService::doRender: Unresolved error code 80040218 Details: QT5.1.1 MingW4.8 32bit Windows 7 64bit I suspect that is why my Windows is 64bit , but the QT/MingW * runs on 32bit and maybe miss some DLL/LIB . How can I resolve this?

Qt QWEBview JavaScript callback

丶灬走出姿态 提交于 2019-11-27 04:19:47
问题 How to pass a function "pointer" from JavaScript to a slot? in JavaScript: function f1() { alert("f1"); } qtclass.submit(f1); and in Qt: public slots: void submit(void * ptr) { (void)ptr; } I need the "f1", function to get fired in the JavaScript from the c++, once some processing is done. Also I do not know in advance the name of the function pointer. 回答1: you should be able to execute your script using QWebFrame::evaluateJavaScript method. See if an example below would work for you: