qtwebkit

Why is QWebView.loadFinished called several times on some sites e.g. youtube?

荒凉一梦 提交于 2019-12-30 03:26:11
问题 As per the documentation, loadFinished should be emitted only after all the page elements have finished loading. This should mean that it'll be called only once, however I've noticed that on some sites like youtube.com, it gets called twice ? Is there any other way to get around this bug or whats the most reliable way to detect page.load event ? Here's the test code : import sys from PyQt4 import QtCore, QtGui, QtWebKit from PyQt4.QtCore import QUrl from PyQt4.QtGui import QApplication def

Project ERROR: Unknown module(s) in QT: webkitwidgets

拟墨画扇 提交于 2019-12-28 05:06:26
问题 I am porting code from qt4 to qt5. I added the following line to my .pro file, as suggested: QT += webkitwidgets However, when I run qmake , I get the this error: Project ERROR: Unknown module(s) in QT: webkitwidgets I am developing on Ubuntu 12.04 LTS and installed Qt as described. 回答1: You need to install the webkitwidgets library. On Ubuntu, try this in a terminal: sudo apt-get install libqt5webkit5-dev 回答2: If you need to install the webkit* Windows library for Qt 5.7 you should compile

Project ERROR: Unknown module(s) in QT: webkitwidgets

旧巷老猫 提交于 2019-12-28 05:06:22
问题 I am porting code from qt4 to qt5. I added the following line to my .pro file, as suggested: QT += webkitwidgets However, when I run qmake , I get the this error: Project ERROR: Unknown module(s) in QT: webkitwidgets I am developing on Ubuntu 12.04 LTS and installed Qt as described. 回答1: You need to install the webkitwidgets library. On Ubuntu, try this in a terminal: sudo apt-get install libqt5webkit5-dev 回答2: If you need to install the webkit* Windows library for Qt 5.7 you should compile

How to install a plugin for QtWebKit

廉价感情. 提交于 2019-12-23 08:57:18
问题 I am running a Qt 4.5 commercial snapshot and want to use a plugin that I downloaded (it's a .so file) in my QWebView . Is there a specific location where I need to place this file? Can I grab it using the QWebPluginFactory ? 回答1: I am assuming the plugin here is the NPAPI plugin (e.g. Flash). Under X11, QtWebKit search several common directories for the plugin. For the complete list, see the documentation on Netscape plugin support. In addition to that, you must enable plugin support via

Expose C++ object to Javascript in Qt with QtWebEngine

China☆狼群 提交于 2019-12-23 08:46:27
问题 With QtWebkit it is possible to expose C++ objects to Javascript via QWebFrame::addToJavaScriptWindowObject as described in https://stackoverflow.com/a/20685002/595937 Can the same thing be accomplished in Qt 5.4 using QtWebEngine? 回答1: Exporting C++ objects to HTML/JS is not directly possible with QWebEngine. Instead, the newly introduced QWebChannel provides a bridge between HTML/JS and C++. Have a look at the documentation, especially at the examples. There was also a quite good

Expose C++ object to Javascript in Qt with QtWebEngine

早过忘川 提交于 2019-12-23 08:46:07
问题 With QtWebkit it is possible to expose C++ objects to Javascript via QWebFrame::addToJavaScriptWindowObject as described in https://stackoverflow.com/a/20685002/595937 Can the same thing be accomplished in Qt 5.4 using QtWebEngine? 回答1: Exporting C++ objects to HTML/JS is not directly possible with QWebEngine. Instead, the newly introduced QWebChannel provides a bridge between HTML/JS and C++. Have a look at the documentation, especially at the examples. There was also a quite good

Building QtWebKit with QT 5.6 on Mac 10.11

我是研究僧i 提交于 2019-12-23 04:45:16
问题 I'm trying to build Qt 5.6.0 (new release) with Qt Webkit on Mac OS 10.11 and I have a compiling error when I try. I downloaded the tar.gz source of 5.6.0, then I downloaded QtWebkit source from Community folder for 5.6.0. I added the qtwebkit folder in the same folder of qtbase like previous version. Anything else is needed? I'm using this configure: OPENSSL_LIBS='-L/usr/local/opt/openssl/lib -lssl -lcrypto' ./configure -nomake examples -opensource -openssl-linked -I /usr/local/opt/openssl

add a new plugins path to Qtwebkit

老子叫甜甜 提交于 2019-12-23 01:07:48
问题 I am trying to extend the search paths that qtwebkit uses to search for plugins. Basically I'm creating a plugin that is designed using the QTBrowserPlugin class and I am trying to make my browser which is programmeed using QTwebKit to search for the plugin in a folder specified by me as I don't want the plugin to be stored in the Mozilla Firefox plugins directory or the standard plugins directories. Is this possible, and can I make my browser only look in the directory that I've specified,

Render web content offscreen using QtWebEngine

泪湿孤枕 提交于 2019-12-22 09:07:21
问题 I am trying to port an application that uses QtWebKit to render web content over to one that uses QtWebEngine. I am limited what I can change architecturally so I have to stick with the current approach of rendering the page, capturing to a memory buffer and then moving that across to a different process where the buffer is used as a texture in OpenGL. I've tried porting the code over (broadly speaking) by replacing WebKit with WebEngine, but the APIs are different. Can anyone tell me if this