Difference between revisions of "KApplication template"

From Trinity Desktop Project Wiki
Jump to navigation Jump to search
imported>Eliddell
(Created page with "Category:Developers Category:KDE3 Category:Tutorials <syntaxhighlight lang="text"> #include <qstring.h> #include <kapplication.h> #include <kaboutdata.h> #include...")
 
(Updated)
Line 2: Line 2:
 
[[Category:KDE3]]
 
[[Category:KDE3]]
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
  +
{{Applicable to TDE}}
   
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
#include <qstring.h>
+
#include <tqstring.h>
#include <kapplication.h>
+
#include <tdeapplication.h>
#include <kaboutdata.h>
+
#include <tdeaboutdata.h>
#include <kmessagebox.h>
+
#include <tdemessagebox.h>
#include <kcmdlineargs.h>
+
#include <tdecmdlineargs.h>
   
 
int main (int argc, char *argv[])
 
int main (int argc, char *argv[])
 
{
 
{
KAboutData aboutData( "test", "test",
+
TDEAboutData aboutData( "test", "test",
"1.0", "test", KAboutData::License_GPL,
+
"1.0", "test", TDEAboutData::License_GPL,
"(c) 2006" );
+
"(c) 2021" );
KCmdLineArgs::init( argc, argv, &aboutData );
+
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication khello;
+
TDEApplication hello_tde;
 
KMessageBox::information(0,"This is an example");
 
KMessageBox::information(0,"This is an example");
 
}
 
}

Revision as of 21:34, 22 August 2021

TDE Logo.png
Information on this page is applicable to TDE
This page contains archived KDE 3.x content from various sources which is directly applicable to (or has been updated for) the Trinity Desktop Environment.
#include <tqstring.h>
#include <tdeapplication.h>
#include <tdeaboutdata.h>
#include <tdemessagebox.h>
#include <tdecmdlineargs.h>

int main (int argc, char *argv[])
{
        TDEAboutData aboutData( "test", "test",
        "1.0", "test", TDEAboutData::License_GPL,
        "(c) 2021" );
        TDECmdLineArgs::init( argc, argv, &aboutData );
        TDEApplication hello_tde;
        KMessageBox::information(0,"This is an example");
}