summaryrefslogtreecommitdiffstats
path: root/tutorial/t3/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/t3/main.cpp')
-rw-r--r--tutorial/t3/main.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tutorial/t3/main.cpp b/tutorial/t3/main.cpp
new file mode 100644
index 0000000..5a02240
--- /dev/null
+++ b/tutorial/t3/main.cpp
@@ -0,0 +1,28 @@
+/****************************************************************
+**
+** Qt tutorial 3
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qfont.h>
+#include <qvbox.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+
+ QVBox box;
+ box.resize( 200, 120 );
+
+ QPushButton quit( "Quit", &box );
+ quit.setFont( QFont( "Times", 18, QFont::Bold ) );
+
+ QObject::connect( &quit, SIGNAL(clicked()), &a, SLOT(quit()) );
+
+ a.setMainWidget( &box );
+ box.show();
+
+ return a.exec();
+}