summaryrefslogtreecommitdiffstats
path: root/examples/tut7.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tut7.py')
-rwxr-xr-xexamples/tut7.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/examples/tut7.py b/examples/tut7.py
index 1df3f4e..ed8da51 100755
--- a/examples/tut7.py
+++ b/examples/tut7.py
@@ -3,19 +3,19 @@
# TQt tutorial 7.
import sys
-from PyTQt import qt
+from PyTQt import tqt
-class LCDRange(qt.TQVBox):
+class LCDRange(tqt.TQVBox):
def __init__(self, parent=None, name=None):
- qt.TQVBox.__init__(self, parent, name)
+ tqt.TQVBox.__init__(self, parent, name)
- lcd = qt.TQLCDNumber(2, self, "lcd")
- self.slider = qt.TQSlider(qt.TQt.Horizontal, self, "slider")
+ lcd = tqt.TQLCDNumber(2, self, "lcd")
+ self.slider = tqt.TQSlider(tqt.TQt.Horizontal, self, "slider")
self.slider.setRange(0, 99)
self.slider.setValue(0)
- self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), lcd, qt.SLOT("display(int)"))
- self.connect(self.slider, qt.SIGNAL("valueChanged(int)"), self, qt.PYSIGNAL("valueChanged(int)"))
+ self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)"))
+ self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)"))
def value(self):
return self.slider.value()
@@ -24,16 +24,16 @@ class LCDRange(qt.TQVBox):
self.slider.setValue(value)
-class MyWidget(qt.TQVBox):
+class MyWidget(tqt.TQVBox):
def __init__(self, parent=None, name=None):
- qt.TQVBox.__init__(self, parent, name)
+ tqt.TQVBox.__init__(self, parent, name)
- quit = qt.TQPushButton("Quit", self, "quit")
- quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
+ quit = tqt.TQPushButton("Quit", self, "quit")
+ quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold))
- self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
+ self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()"))
- grid = qt.TQGrid(4, self)
+ grid = tqt.TQGrid(4, self)
self.lcdlist = []
previous = None
@@ -43,13 +43,13 @@ class MyWidget(qt.TQVBox):
lr = LCDRange(grid)
if previous:
- self.connect(lr, qt.PYSIGNAL("valueChanged(int)"), previous.setValue)
+ self.connect(lr, tqt.PYSIGNAL("valueChanged(int)"), previous.setValue)
previous = lr
self.lcdlist.append(lr)
-a = qt.TQApplication(sys.argv)
+a = tqt.TQApplication(sys.argv)
w = MyWidget()
a.setMainWidget(w)