summaryrefslogtreecommitdiffstats
path: root/examples3/tut3.py
blob: 277c352b8805c3c9a4a76a466fa21e5603c32735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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())