Created
May 20, 2012 11:53
-
-
Save empr/2757798 to your computer and use it in GitHub Desktop.
PySide QWebInspector example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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