< Languages | Python/PyKDE WebKit Tutorial
Revision as of 20:50, 29 June 2011 by Neverendingo (talk | contribs) (Text replace - "</code>" to "</syntaxhighlight>")
Languages/Python/PyKDE WebKit Tutorial/webkit2.py
#!/usr/bin/env python
import sys
from PyKDE4.kdecore import *
from PyKDE4.kdeui import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
appName = "python-kde-tutorial"
catalog = ""
programName = ki18n("PyKDE Tutorial")
version = "1.0"
description = ki18n("A Small Qt WebKit Example")
license = KAboutData.License_GPL
copyright = ki18n("(c) 2008 Canonical Ltd")
text = ki18n("none")
homePage = "www.kubuntu.org"
bugEmail = ""
aboutData = KAboutData (appName, catalog, programName, version, description,
license, copyright, text, homePage, bugEmail)
KCmdLineArgs.init(sys.argv, aboutData)
app = KApplication()
web = QWebView()
web.load(QUrl("http://kubuntu.org"))
web.show()
sys.exit(app.exec_())
This page was last edited on 10 March 2016, at 17:39. Content is available under Creative Commons License SA 4.0 unless otherwise noted.