Skip to content

Instantly share code, notes, and snippets.

@empr
Created May 20, 2012 11:53
Show Gist options
  • Select an option

  • Save empr/2757798 to your computer and use it in GitHub Desktop.

Select an option

Save empr/2757798 to your computer and use it in GitHub Desktop.
PySide QWebInspector example
# coding: utf-8
import sys
import site
site.addsitedir('/usr/local/lib/python2.7/site-packages')
from PySide import QtCore, QtGui, QtWebKit
app = QtGui.QApplication(sys.argv)
view = QtWebKit.QWebView()
view.settings().setAttribute(QtWebKit.QWebSettings.DeveloperExtrasEnabled, True)
view.load(QtCore.QUrl('http://google.com'))
view.show()
inspector = QtWebKit.QWebInspector()
inspector.setPage(view.page())
inspector.show()
sys.exit(app.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment