From 8a055d66f43592c257cece2eb8cc021808062917 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 29 Nov 2011 01:11:08 -0600 Subject: Initial TQt conversion --- examples2/table.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples2/table.py') diff --git a/examples2/table.py b/examples2/table.py index 58fd04b..f9502b7 100755 --- a/examples2/table.py +++ b/examples2/table.py @@ -3,12 +3,12 @@ import sys from qt import * -class Table(QTableView): +class Table(TQTableView): def __init__(self, numRows, numCols, parent=None, name=''): - QTableView.__init__(self, parent, name) + TQTableView.__init__(self, parent, name) self.curRow = self.curCol = 0 - self.setFocusPolicy(QWidget.StrongFocus) - self.setBackgroundMode(QWidget.PaletteBase) + self.setFocusPolicy(TQWidget.StrongFocus) + self.setBackgroundMode(TQWidget.PaletteBase) self.setNumCols(numCols) self.setNumRows(numRows) self.setCellWidth(100) @@ -39,11 +39,11 @@ class Table(QTableView): if self.hasFocus(): p.drawRect(0, 0, x2, y2) else: - p.setPen(Qt.DotLine) + p.setPen(TQt.DotLine) p.drawRect(0, 0, x2, y2) - p.setPen(Qt.SolidLine) + p.setPen(TQt.SolidLine) - p.drawText(0,0,w,h,Qt.AlignCenter,self.contents[self.indexOf(row,col)]) + p.drawText(0,0,w,h,TQt.AlignCenter,self.contents[self.indexOf(row,col)]) def mousePressEvent(self, me): oldRow = self.curRow @@ -105,7 +105,7 @@ class Table(QTableView): numRows = 20 numCols = 20 -a = QApplication(sys.argv) +a = TQApplication(sys.argv) v = Table(numRows, numCols) for i in range(numRows): for j in range(numCols): -- cgit v1.2.1