diff options
Diffstat (limited to 'examples/tut3.py')
-rwxr-xr-x | examples/tut3.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/tut3.py b/examples/tut3.py new file mode 100755 index 0000000..277c352 --- /dev/null +++ b/examples/tut3.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +# TQt tutorial 3. + +import sys +from python_tqt import qt + + +a = qt.TQApplication(sys.argv) + +box = qt.TQVBox() +box.resize(200, 120) + +quit = qt.TQPushButton("Quit", box) +quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) + +qt.TQObject.connect(quit, qt.SIGNAL("clicked()"), a, qt.SLOT("quit()")) + +a.setMainWidget(box) +box.show() +sys.exit(a.exec_loop()) |