Translations:Development/Tutorials/First program/14/nl

From KDE TechBase
Revision as of 09:17, 9 September 2012 by Willem1 (talk | contribs) (Created page with "KCmdLineArgs::init( argc, argv, &aboutData ); KApplication app; KGuiItem yesButton( i18n( "Hello" ), QString(), i18n( "This is a tooltip" ), ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

KCmdLineArgs::init( argc, argv, &aboutData );

   KApplication app;
   KGuiItem yesButton( i18n( "Hello" ), QString(),
                       i18n( "This is a tooltip" ),
                       i18n( "This is a WhatsThis help text." ) );
   return 
       KMessageBox ::questionYesNo 
       (0, i18n( "Hello World" ), i18n( "Hello" ), yesButton ) 
       == KMessageBox ::Yes? EXIT_SUCCESS: EXIT_FAILURE;

} </syntaxhighlight> De eerste KDE-specifieke code die we tegenkomen is KAboutData. Deze klasse bevat informatie over het programma, zoals een korte beschrijving, de auteurs of licentie-informatie. Bijna ieder KDE-programma heeft deze klasse nodig.