From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/tutorial2-04.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'doc/html/tutorial2-04.html') diff --git a/doc/html/tutorial2-04.html b/doc/html/tutorial2-04.html index cdbe2b6bf..755c2c927 100644 --- a/doc/html/tutorial2-04.html +++ b/doc/html/tutorial2-04.html @@ -36,29 +36,29 @@ body { background: #ffffff; color: black; }

(main.cpp.)

-

    #include <qapplication.h>
+
    #include <ntqapplication.h>
     #include "chartform.h"
 
     int main( int argc, char *argv[] )
     {
-        TQApplication app( argc, argv );
+        TQApplication app( argc, argv );
 
-        TQString filename;
-        if ( app.argc() > 1 ) {
-            filename = app.argv()[1];
-            if ( !filename.endsWith( ".cht" ) )
-                filename = TQString::null;
+        TQString filename;
+        if ( app.argc() > 1 ) {
+            filename = app.argv()[1];
+            if ( !filename.endsWith( ".cht" ) )
+                filename = TQString::null;
         }
 
         ChartForm *cf = new ChartForm( filename );
-        app.setMainWidget( cf );
-        cf->show();
+        app.setMainWidget( cf );
+        cf->show();
 
-        return app.exec();
+        return app.exec();
     }
 

We have kept the main() function simple and small. We create a -TQApplication object and pass it the command line arguments. We are +TQApplication object and pass it the command line arguments. We are allowing users to invoke the program with chart mychart.cht, so if they've added a filename we pass that through to the chart form constructor. Most of the action takes place within the chart form -- cgit v1.2.1