Languages/Python/PyKDE WebKit Tutorial/webkit1.py: Difference between revisions

From KDE TechBase
m (Text replace - "<code python>" to "<syntaxhighlight lang="python">")
m (Text replace - "</code>" to "</syntaxhighlight>")
Line 14: Line 14:


sys.exit(app.exec_())
sys.exit(app.exec_())
</code>
</syntaxhighlight>

Revision as of 20:50, 29 June 2011

#!/usr/bin/env python

import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *

app = QApplication(sys.argv)

web = QWebView()
web.load(QUrl("http://kubuntu.org"))
web.show()

sys.exit(app.exec_())