From 0f92dd542b65bc910caaf190b7c623aa5158c86a Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 14 Nov 2011 22:33:41 -0600 Subject: Fix native TQt3 accidental conversion to tquit --- doc/html/tutorial1-04.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'doc/html/tutorial1-04.html') diff --git a/doc/html/tutorial1-04.html b/doc/html/tutorial1-04.html index 005aa983c..820cc797d 100644 --- a/doc/html/tutorial1-04.html +++ b/doc/html/tutorial1-04.html @@ -59,11 +59,11 @@ public: setMinimumSize( 200, 120 ); setMaximumSize( 200, 120 ); - TQPushButton *tquit = new TQPushButton( "Quit", this, "tquit" ); - tquit->setGeometry( 62, 40, 75, 30 ); - tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); + TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); + quit->setGeometry( 62, 40, 75, 30 ); + quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) ); + connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); } @@ -116,15 +116,15 @@ constructor.

Because this widget doesn't know how to handle resizing, we fix its size by setting the minimum and maximum to be equal. In the next chapter we will show how a widget can respond to resize event from the user. -

        TQPushButton *tquit = new TQPushButton( "Quit", this, "tquit" );
-        tquit->setGeometry( 62, 40, 75, 30 );
-        tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+

        TQPushButton *quit = new TQPushButton( "Quit", this, "quit" );
+        quit->setGeometry( 62, 40, 75, 30 );
+        quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
 

Here we create and set up a child widget of this widget (the new widget's -parent is this) which has the widget name "tquit". The widget +parent is this) which has the widget name "quit". The widget name has nothing to do with the button text; it just happens to be similar in this case. -

Note that tquit is a local variable in the constructor. MyWidget +

Note that quit is a local variable in the constructor. MyWidget does not keep track of it, but TQt does, and will by default delete it when MyWidget is deleted. This is why MyWidget doesn't need a destructor. (On the other hand, there is no harm in deleting a child @@ -132,7 +132,7 @@ when you choose to, the child will automatically tell TQt about its imminent death.)

The setGeometry() call does the same as move() and resize() did in the previous chapters. -

        connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+

        connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) );
     }
 

Because the MyWidget class doesn't know about the application object, it -- cgit v1.2.1