View a web page with PySide/PyQt

vegaseat 1 Tallied Votes 1K Views Share

PySide's QWebView can load a given url and display the web page associated with it with just a few lines of code.

exploring PySide.QtWebKit.QWebView()
display a web page with a given url

(PySide is the official LGPL-licensed version of PyQT)
for Python33 you can use the Windows self-extracting installer

PySide 1.2.1 (August 16, 2013) has access to the complete Qt 4.8 framework

modified example from:

from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtWebKit import *

# create a PySide/PyQt application
app = QApplication([])

# create a PySide.QtWebKit.QWebView() to display a web page
# (your computer needs to be connected to the internet)
view = QWebView()

# setGeometry(x_pos, y_pos, width, height)
view.setGeometry(100, 150, 1200, 600)

# pick a known url
#url = ""
url = ""


# run the application event loop