summaryrefslogtreecommitdiffstats
path: root/python/pyqt/examples2/tut3.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyqt/examples2/tut3.py')
-rwxr-xr-xpython/pyqt/examples2/tut3.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/python/pyqt/examples2/tut3.py b/python/pyqt/examples2/tut3.py
new file mode 100755
index 00000000..2cc3576c
--- /dev/null
+++ b/python/pyqt/examples2/tut3.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+# Qt tutorial 3.
+
+import sys
+from qt import *
+
+a = QApplication(sys.argv)
+
+box = QVBox()
+box.resize(200,120)
+
+quit = QPushButton("Quit",box)
+quit.setFont(QFont("Times",18,QFont.Bold))
+
+QObject.connect(quit,SIGNAL("clicked()"),a,SLOT("quit()"))
+
+a.setMainWidget(box)
+box.show()
+a.exec_loop()