diff options
Diffstat (limited to 'examples2/splitter.py')
-rwxr-xr-x | examples2/splitter.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples2/splitter.py b/examples2/splitter.py index 36a7556..3d7450c 100755 --- a/examples2/splitter.py +++ b/examples2/splitter.py @@ -16,13 +16,13 @@ class Test(TQWidget): y1 = 0 y2 = self.height() - 1 - x = (x1+x2)/2 + x = int((x1+x2)/2) p.drawLine(x, y1, x+d, y1+d) p.drawLine(x, y1, x-d, y1+d) p.drawLine(x, y2, x+d, y2-d) p.drawLine(x, y2, x-d, y2-d) - y = (y1+y2)/2 + y = int((y1+y2)/2) p.drawLine(x1, y, x1+d, y+d) p.drawLine(x1, y, x1+d, y-d) p.drawLine(x2, y, x2-d, y+d) @@ -36,25 +36,25 @@ if __name__=="__main__": s2 = TQSplitter(TQt.Horizontal, s1, "top") t1 = Test(s2) - t1.setBackgroundColor(TQt.blue.light(180)) + t1.setPaletteBackgroundColor(TQt.blue.light(180)) t1.setMinimumSize(50,0) t2 = Test(s2) - t2.setBackgroundColor(TQt.green.light(180)) + t2.setPaletteBackgroundColor(TQt.green.light(180)) s2.setResizeMode(t2, TQSplitter.KeepSize) s2.moveToFirst(t2) s3 = TQSplitter(TQt.Horizontal, s1, "bottom") t3 = Test(s3) - t3.setBackgroundColor(TQt.red) + t3.setPaletteBackgroundColor(TQt.red) t4 = Test(s3) - t4.setBackgroundColor(TQt.white) + t4.setPaletteBackgroundColor(TQt.white) t5 = Test(s3) t5.setMaximumHeight(250) t5.setMinimumSize(80,50) - t5.setBackgroundColor(TQt.yellow) + t5.setPaletteBackgroundColor(TQt.yellow) s1.setOpaqueResize(1) s2.setOpaqueResize(1) |