|
Last change
on this file since 89 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:
581 bytes
|
| Line | |
|---|
| 1 | /****************************************************************
|
|---|
| 2 | **
|
|---|
| 3 | ** Qt tutorial 2
|
|---|
| 4 | **
|
|---|
| 5 | ****************************************************************/
|
|---|
| 6 |
|
|---|
| 7 | #include <qapplication.h>
|
|---|
| 8 | #include <qpushbutton.h>
|
|---|
| 9 | #include <qfont.h>
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 | int main( int argc, char **argv )
|
|---|
| 13 | {
|
|---|
| 14 | QApplication a( argc, argv );
|
|---|
| 15 |
|
|---|
| 16 | QPushButton quit( "Quit", 0 );
|
|---|
| 17 | quit.resize( 75, 30 );
|
|---|
| 18 | quit.setFont( QFont( "Times", 18, QFont::Bold ) );
|
|---|
| 19 |
|
|---|
| 20 | QObject::connect( &quit, SIGNAL(clicked()), &a, SLOT(quit()) );
|
|---|
| 21 |
|
|---|
| 22 | a.setMainWidget( &quit );
|
|---|
| 23 | quit.show();
|
|---|
| 24 | return a.exec();
|
|---|
| 25 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.