summaryrefslogtreecommitdiffstats
path: root/examples2/splitter.py
diff options
context:
space:
mode:
authoraneejit1 <aneejit1@gmail.com>2022-07-28 15:46:19 +0000
committeraneejit1 <aneejit1@gmail.com>2022-07-30 17:54:15 +0000
commite602246539fd7435aaeb440fcb7f852c92c8426b (patch)
tree35e09f5d93c67158e6c1160d6d9b27ae8a0bf966 /examples2/splitter.py
parentb34531364d5c0d3be7056d87011afd8bd538a0e7 (diff)
downloadpytqt-e602246539fd7435aaeb440fcb7f852c92c8426b.tar.gz
pytqt-e602246539fd7435aaeb440fcb7f852c92c8426b.zip
Remove Qt V2 support and example files
Build files for pyuic2 have been removed along with the examples for version 2 of Qt and the build/configure scripts have been amended accordingly. The "examples3" directory has been renamed to just "examples". Signed-off-by: aneejit1 <aneejit1@gmail.com>
Diffstat (limited to 'examples2/splitter.py')
-rwxr-xr-xexamples2/splitter.py65
1 files changed, 0 insertions, 65 deletions
diff --git a/examples2/splitter.py b/examples2/splitter.py
deleted file mode 100755
index 3d7450c..0000000
--- a/examples2/splitter.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-from python_tqt.qt import *
-
-class Test(TQWidget):
- def __init__(self, parent=None, name='Test', f=0):
- TQWidget.__init__(self, parent, name, f)
-
- def paintEvent(self, e):
- p = TQPainter(self)
- p.setClipRect(e.rect())
- d = 1000
- x1 = 0
- x2 = self.width() - 1
- y1 = 0
- y2 = self.height() - 1
-
- 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 = 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)
- p.drawLine(x2, y, x2-d, y-d)
-
-
-if __name__=="__main__":
- a = TQApplication(sys.argv)
-
- s1 = TQSplitter(TQt.Vertical, None, "main")
- s2 = TQSplitter(TQt.Horizontal, s1, "top")
-
- t1 = Test(s2)
- t1.setPaletteBackgroundColor(TQt.blue.light(180))
- t1.setMinimumSize(50,0)
-
- t2 = Test(s2)
- t2.setPaletteBackgroundColor(TQt.green.light(180))
- s2.setResizeMode(t2, TQSplitter.KeepSize)
- s2.moveToFirst(t2)
-
- s3 = TQSplitter(TQt.Horizontal, s1, "bottom")
-
- t3 = Test(s3)
- t3.setPaletteBackgroundColor(TQt.red)
- t4 = Test(s3)
- t4.setPaletteBackgroundColor(TQt.white)
-
- t5 = Test(s3)
- t5.setMaximumHeight(250)
- t5.setMinimumSize(80,50)
- t5.setPaletteBackgroundColor(TQt.yellow)
-
- s1.setOpaqueResize(1)
- s2.setOpaqueResize(1)
- s3.setOpaqueResize(1)
-
- a.setMainWidget(s1)
- s1.show()
- a.exec_loop()