qwebview

Loading page with frames for a screenshot

I have an app that renders a web page in a iframe, and then loads X number of images in a div that overlays the frame. So I have this python script that loads the url, and takes a screenshot. It works on regular web pages, but I think the frame is throwing it off. Below is my code, and a link to the screenshot it's taking. #!/usr/bin/...

Draw html page using the QPainter

How i can draw html page? QWebView *view = new QWebView(); view.Load(Url("http://www.google.com")); QPrinter printer = new Qprinter(); How I can draw this view? ...

how to scroll a page inside a qwebview?

I guess this should be a simple task: change a QWebView's content (it always contains several pages of stuff) then scroll the page back in the previous position: y = self.webView.page().mainFrame().scrollPosition().y() self.webView.setHtml(looong_html_text) if y != 0: self.webView.scroll(0, y) self.webView.page().mainFrame().scr...

Setting useragent in QWebView

I have a QWebView, which works fine. Then, using code from spynner, I attempt to bind the useragent method to a custom method. This appears to work in spynner (with a QWebPage), but not here. Any help much appreciated. Code: def customuseragent(url): print 'called for %s' % url return 'custom ua' #inside a class self.webkit = QtWebK...

QWebView - dealing with javascript infinite loop

web_view_crash.py import sys from PyQt4.QtGui import * from PyQt4.QtCore import * from PyQt4.QtWebKit import * app = QApplication(sys.argv) view = QWebView() view.settings().setAttribute(QWebSettings.JavascriptEnabled, True) view.load(QUrl('infinite_loop.html')) view.show() app.exec_() infinite_loop.html <script> while(true) { ...

Can't call Flash (Swf) method from Javascript within QWebView

Hello, everybody! I have: Swf-file, that a) makes one of its method available to the outer world through ExternalInterface.addCallback; b) calls predefined outer world method through ExternalInterface.call; html-page, where this Swf-file resides. There are two javascipt methods in this html: one for calling Swf-published-method and on...

How to fire a JavaScript event via C++ in QWebView

Hi, please note that I'm a complete beginner to Qt development. I have a QWebView with a QObject added to the JavaScript window object. How do I fire a JS event on that object? view->page()->mainFrame()->addToJavaScriptWindowObject(objName,obj); I want to be able to listen to events using addEventListener. window.objName.addEventLis...

PyQt4.QtWebKit: QWebPage QWebView set timeout when load stop

Is there any way to say to a QWebPage or to a QWebView stop loading page if some sort of timeout is exceeded? Sultan ...

QWebPage. How to handle failed request.

I want to handle failed requests (for example, with http 404 error code in reply), display my own "notfound.html" page in QWebView. But there is no simple way to handle replies with QWebView/QWebPage classes. As I see in Arora browser, for such requests uses next mechanism: QWebPage::setForwardUnsupportedContent(true), QWebPage::unsuppo...

QtBrowserPlugin crash when I nest other plugin into it: is my fix correct?

There is QtBrowserPlugin which contains QWebView that load a page that contains other plugin. (opera (some_page (my_qtbrowser_plugin (QWebView (some_other_page (some_other_plugin)))))) Why after loading a page which loads or attempts to load some other plugin it stops di...

Does qwebview/qwebpage download contents in a separate thread or in the main/gui thread?

If it doesn't then how can i explicitly force it to download async. in a separate thread? ...

QWebview/webkit disable selection of text

I have a QWebView which loads some webpage, but the problem when mouse is pressed and dragged it selectes everything which comes in its way. Is there any way I can get rid of this?? I dont want text and other items to be selected., If I restrict mouseMove and mousePress then it other functionality with these event also gets restricted ...

Force QWebView to download web page content in a separate thread?

How can i force QWebView into downloading the webpage and related content in a separate thread? ...

QT: Pause function flow till QWebView SIGNAL is completed

Hello! I'm a mostly webdeveloper, so my question can be somekind of a beginners. I'm writing a function which works with QWebView content, some kind of a macro script which makes action on loaded web page. code is something like that: somefunction() { QWebView *webView; webView->load(QUrl("http://www.google.com")); <...> here I want...

why loading flash stream from Youtube (api player ) generate security warning in QwebKit

I need to load YouTube video with the YouTube API in desktop application Im using Qwebkit. But when I load the html code that links to the YouTube player im getting the security warring How does application that are desktop can overcome this? For example : Miro,SongBird ...