Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

PyKDE Programming/KDE

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

The Structure of a KDE Application A basic KApplication Every KDE application you are going to write from now on will contain most of the following code. #!/usr/bin/python import sys from PyKDE4.kdecore import ki18n, KCmdLineArgs, KAboutData from PyKDE4.kdeui import KApplication appName = "kde-application" catalog = "simple test" programName = ki18n("KDE Application") version = "1.0" aboutData = KAboutData(appName, catalog, programName, version) KCmdLineArgs.init (sys.argv, aboutData) app = KApplication () # your main widget (the application window) would be created and shown here sys.exit(app.exec_()) Go ahead, run this file. The program will load and will not end until you terminate it. Next we will learn how to add a first widget.