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

From KDE TechBase
No edit summary
(Fix the code tags)
Line 1: Line 1:
<highlightSyntax language="cpp">
<code>
#include <qstring.h>
#include <qstring.h>
#include <kapplication.h>
#include <kapplication.h>
Line 15: Line 15:
         KMessageBox::information(0,"This is an example");
         KMessageBox::information(0,"This is an example");
}
}
</highlightSyntax>
</code>

Revision as of 11:28, 23 December 2006

  1. include <qstring.h>
  2. include <kapplication.h>
  3. include <kaboutdata.h>
  4. include <kmessagebox.h>
  5. 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");

}