qtwebkit

How to disable rendering in QML WebView?

╄→гoц情女王★ 提交于 2020-01-25 06:01:40
问题 I am currently building an application that makes use of QML WebView ( import QtWebKit 3.0 ). The users need to resize the WebView very often (I am using a QML SplitView ), however this leads to the UI to lag extremely whenever the app window is resized. Is there any way to prevent this? 回答1: Instead of changing the width and height properties change scale property of the WebView . At beginning of the resize save initial values of width and height . On resize don't change width and height .

How to use qwebkitplatformplugin?

邮差的信 提交于 2020-01-16 03:20:26
问题 how to use qwebkitplatformplugin in a QWebView ? I have the following code: #include <QWebKitPlatformPlugin> MainWindow::MainWindow(QWidget *parent, bool new) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); webView = new QWebView; ui->webViewLay->addWidget(webView); webView->setHtml("<p>test</p>"); } but found no example of how to use extensions from qwebkitplatformplugin . [edit] Within this API has several extensions such as SpellChecker and Notifications , I would like

How to use qwebkitplatformplugin?

徘徊边缘 提交于 2020-01-16 03:20:07
问题 how to use qwebkitplatformplugin in a QWebView ? I have the following code: #include <QWebKitPlatformPlugin> MainWindow::MainWindow(QWidget *parent, bool new) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); webView = new QWebView; ui->webViewLay->addWidget(webView); webView->setHtml("<p>test</p>"); } but found no example of how to use extensions from qwebkitplatformplugin . [edit] Within this API has several extensions such as SpellChecker and Notifications , I would like

How to find out the dimensionality of print paper in javascript

落花浮王杯 提交于 2020-01-14 03:11:09
问题 I am generating reports in HTML formats, and want to print them automatically using Qt (qt has a webkit based browser, and one can render its contents to a PDF file). I want to position the elements of the report depending on the target page size. For that i need to access the size of the paper (preferably in pixels). Since i am using webkit, it has all the latest html5 and css3 features. is there some api available to access printed page properties inside javascript. for example, would be

PDF with QWebView: missing refresh/repaint after loading

匆匆过客 提交于 2020-01-11 07:17:19
问题 I use the QWebView (python 3.3 + pyside 1.1.2 + Qt 4.8) as FileViewer. Picture, Text, HTML, ... all fine, but PDF has a display problem. I tested two possible ways. internal pdf viewer: after use webview.load(file) it loads, but the screen is blank, after loading another file, all works fine, it shows the file pdf.js: after use setContent() with filebase, it loads the webviewer.html/.js with a white page and the loading circle. The screen only refresh if I resize the form or use the

Expose C++ object to Javascript in Qt

混江龙づ霸主 提交于 2020-01-11 02:42:05
问题 Is there any way I can expose a C++ object/function to JavaScript running inside the QtWebKit browser in Qt? It's possible to expose ActionScript objects to JS code running inside the WebKit browser in Adobe AIR - I'm looking for similar functionality in Qt. 回答1: Yes. Take a look at this. It should be a good start. 回答2: EDIT: LINK IS WORKING, BUT JUST IN CASE THE LINK BREAKS AGAIN [Link] by Richard Moore ... One question I've seen come up several times on #qt and qt-interest is how to add

Qt/webkit and flash

一笑奈何 提交于 2020-01-11 02:32:07
问题 I have installed pyqt 4.8.1 on xp and Qt in package. I have a tag like <object ...> <param value='1.swf'> <embed src='1.swf'></embed> </param> </object> But Qt/webkit doesn't show flash. (there is not problem with code and IE or chrome). Does Qt/webkit support flash? 回答1: All you have to do is enable plugins. See the python specific Qt example but in C++ its like this. QWebPage *webpage = ... webpage->settings()->setAttribute(QWebSettings::PluginsEnabled, true); Plugins are loaded by NPAPI

Disable drag/drop in QtWebkit

非 Y 不嫁゛ 提交于 2020-01-02 17:49:18
问题 I am trying to create an HTML GUI for an application using Qt's WebKit... so far everything is going smooth with a minor problem, I don't want people to be able to drag and drop images from my GUI. I have disabled text selection using a small java script. But I'm not sure how to disable image dragging.... I have used onmousedown="return false" in the body tag but it disables mouse clicking and this would affect all of my input fields since the user will not be able to get the focus on input

How to port Qt4.6 Phonon based media-application to Qt 5.1?

左心房为你撑大大i 提交于 2020-01-02 07:10:17
问题 I have a Qt 4.6 based application which use QtWebView to load a HTML page with tag inside to play a network multimedia source on Windows platform. Instead of using the default PHONON playback engine i build another PHONON back-end engine to handle the media download, demuxer,decoder, rendering etc. It works pretty well. However i need to update to Qt 5.1 to benefit the improvement and bug fix in latest QtWebView. From Qt 4.8 PHONON was dropped and when porting to Qt 5.1 my self implemented

Using QTWebKit to display a website stored in memory

余生长醉 提交于 2020-01-02 04:31:28
问题 Currently I have my HTML, JS, CSS, graphics, etc stored locally on hard disk and access them using QWebFrame::SetUrl( QUrl::fromLocalFile( "appFolder\html\index.html" )) . At some point I am going to need to encrypt the locally stored files so I'm looking for a way to either decrypt them as they're requested or to decrypt them all into memory and access them that way. I know I can use QWebFrame::setContent( htmlData ) to load the HTML from memory so I can load the encrypted HTML file, decrypt