summaryrefslogtreecommitdiffstats
path: root/examples/tut2.py
blob: 0f34b16074c4f48f29bd7a80c02d02f905a35325 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python

# TQt tutorial 2.

import sys
from PyTQt import tqt


a = tqt.TQApplication(sys.argv)

quit = tqt.TQPushButton("Quit", None)
quit.resize(75, 30)
quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))

qt.TQObject.connect(quit, tqt.SIGNAL("clicked()"), a, tqt.SLOT("quit()"))

a.setMainWidget(quit)
quit.show()
sys.exit(a.exec_loop())