Avec pywebkitgtk :
import gtk import webkit view = webkit.WebView() sw = gtk.ScrolledWindow() sw.add(view) win = gtk.Window(gtk.WINDOW_TOPLEVEL) win.add(sw) win.show_all() view.open('http://acid3.acidtests.org/') gtk.main()
La mếme chose avec pyQt:
import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtWebKit import * app = QApplication(sys.argv) web = QWebView() sa = QScrollArea() sa.setWidget(web) sa.show() web.load(QUrl('http://acid3.acidtests.org/')) sys.exit(app.exec_())
No comments:
Post a Comment