Last change
on this file since 127 was 2, checked in by dmik, 20 years ago |
Imported xplatform parts of the official release 3.3.1 from Trolltech
|
-
Property svn:keywords
set to
Id
|
File size:
621 bytes
|
Line | |
---|
1 | /****************************************************************
|
---|
2 | **
|
---|
3 | ** Qt tutorial 3
|
---|
4 | **
|
---|
5 | ****************************************************************/
|
---|
6 |
|
---|
7 | #include <qapplication.h>
|
---|
8 | #include <qpushbutton.h>
|
---|
9 | #include <qfont.h>
|
---|
10 | #include <qvbox.h>
|
---|
11 |
|
---|
12 | int main( int argc, char **argv )
|
---|
13 | {
|
---|
14 | QApplication a( argc, argv );
|
---|
15 |
|
---|
16 | QVBox box;
|
---|
17 | box.resize( 200, 120 );
|
---|
18 |
|
---|
19 | QPushButton quit( "Quit", &box );
|
---|
20 | quit.setFont( QFont( "Times", 18, QFont::Bold ) );
|
---|
21 |
|
---|
22 | QObject::connect( &quit, SIGNAL(clicked()), &a, SLOT(quit()) );
|
---|
23 |
|
---|
24 | a.setMainWidget( &box );
|
---|
25 | box.show();
|
---|
26 |
|
---|
27 | return a.exec();
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.