python - How to double buffering a WebKit page using QWebView and PySide? -
I'm playing with PySide and QWebView to provide a webkit version of a webapp on Windows.
Simple and easy to install in a complex working Windows environment where only Internet Explorer exists.
More than using QWebKit it's quite simple:
  #! / Usr / bin / env Python # - * - Coding: UTF-8 - * - # hellowebkit.py# Copyright 2009 Patrick Malia ?? Ski, riklaunim@gmail.com ## & lt; Under the GPL license & gt; Import from PySide.QtCore import * from PySide.QtGui import * from PySide.QtWebKit import * app = QApplication (sys.argv) web = QWebView () web.load (QUrl ("http://myapp.example.com") ) Web.show () sys.exit (app.exec_ ())    I would like to enable double buffering so there is no drawing until the next page is fully loaded. / P> 
 Do you know how I should do this? I suppose that possibly using the  web.loadFinished ()  hint?   Cheers,  
 Natim   
 
  you do this You can use  QStackedWidget  and a  QSignalMapper  for:   PySide.QtCore Import * from PySide.QtGui Import * Importing System * PySide.QtWebKit import * app = # 2 web views from QApplication (sys.argv) for stack = one stacks = int] .include (2) for category in stack.setCurrentIndex: web = QWebView (stack) stack.addWidget ) # When loading a webview, go to the web. Loaded [bool] .connect (mapper map) mapper.setMapping (web, i) #Visible webview stack.vidate (1) .load (page "QUICK" (http://myapp.example.com ") Load) stack.show () sys. Exit (app.exec_ ())    
 
  
Comments
Post a Comment