Development/Tutorials/Programming Tutorial KDE 3/kapp: Difference between revisions

From KDE TechBase
No edit summary
 
m (Text replace - "</code>" to "</syntaxhighlight>")
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<highlightSyntax language="cpp">
<syntaxhighlight lang="text">
#include <qstring.h>
#include <qstring.h>
#include <kapplication.h>
#include <kapplication.h>
Line 13: Line 13:
         KCmdLineArgs::init( argc, argv, &aboutData );
         KCmdLineArgs::init( argc, argv, &aboutData );
         KApplication khello;
         KApplication khello;
         KMessageBox::information(0,"This is an example KDE application");
         KMessageBox::information(0,"This is an example");
}
}
</highlightSyntax>
</syntaxhighlight>

Latest revision as of 20:54, 29 June 2011

#include <qstring.h>
#include <kapplication.h>
#include <kaboutdata.h>
#include <kmessagebox.h>
#include <kcmdlineargs.h>

int main (int argc, char *argv[])
{
        KAboutData aboutData( "test", "test",
        "1.0", "test", KAboutData::License_GPL,
        "(c) 2006" );
        KCmdLineArgs::init( argc, argv, &aboutData );
        KApplication khello;
        KMessageBox::information(0,"This is an example");
}