summaryrefslogtreecommitdiffstats
path: root/tutorial/t3/main.cpp
blob: 531f6262e1d86db040bc299b31e50f29520b3c6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/****************************************************************
**
** TQt tutorial 3
**
****************************************************************/

#include <ntqapplication.h>
#include <ntqpushbutton.h>
#include <ntqfont.h>
#include <ntqvbox.h>

int main( int argc, char **argv )
{
    TQApplication a( argc, argv );

    TQVBox box;
    box.resize( 200, 120 );

    TQPushButton quit( "Quit", &box );
    quit.setFont( TQFont( "Times", 18, TQFont::Bold ) );

    TQObject::connect( &quit, TQ_SIGNAL(clicked()), &a, TQ_SLOT(quit()) );

    a.setMainWidget( &box );
    box.show();

    return a.exec();
}