Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Created April 11, 2011 20:07
Show Gist options
  • Save brianleroux/914218 to your computer and use it in GitHub Desktop.
Save brianleroux/914218 to your computer and use it in GitHub Desktop.
A quick, rather goofy, desktop WebKit wrapper w/ Qt/Pyside.
#! /usr/bin/env python
import sys
import os
from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtWebKit import *
app = QApplication(sys.argv)
app.setQuitOnLastWindowClosed(True)
www = os.path.join(os.path.dirname(__file__), 'www', 'index.html')
web = QWebView()
web.resize(100, 300)
web.setWindowTitle('hello world')
web.load(QUrl(www))
web.show()
sys.exit(app.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment