summaryrefslogtreecommitdiffstats
path: root/python/pyqt/examples3/splitter.py
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-14 19:47:20 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-14 19:47:20 +0000
commit875ae8e38bc3663e5057ca910e7ebe4b2994edb9 (patch)
treeddd3b3bc4d6f0343bae986aebbf9555c20f8e558 /python/pyqt/examples3/splitter.py
parentcb61a0436524f8ceba31db51ce3f1c5d4afbbb0e (diff)
downloadtdebindings-875ae8e38bc3663e5057ca910e7ebe4b2994edb9.tar.gz
tdebindings-875ae8e38bc3663e5057ca910e7ebe4b2994edb9.zip
Updated python directory
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1175349 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'python/pyqt/examples3/splitter.py')
-rwxr-xr-xpython/pyqt/examples3/splitter.py65
1 files changed, 0 insertions, 65 deletions
diff --git a/python/pyqt/examples3/splitter.py b/python/pyqt/examples3/splitter.py
deleted file mode 100755
index 3cee9cf1..00000000
--- a/python/pyqt/examples3/splitter.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-from qt import *
-
-class Test(QWidget):
- def __init__(self, parent=None, name='Test', f=0):
- QWidget.__init__(self, parent, name, f)
-
- def paintEvent(self, e):
- p = QPainter(self)
- p.setClipRect(e.rect())
- d = 1000
- x1 = 0
- x2 = self.width() - 1
- y1 = 0
- y2 = self.height() - 1
-
- x = (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
- 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 = QApplication(sys.argv)
-
- s1 = QSplitter(Qt.Vertical, None, "main")
- s2 = QSplitter(Qt.Horizontal, s1, "top")
-
- t1 = Test(s2)
- t1.setEraseColor(Qt.blue.light(180))
- t1.setMinimumSize(50,0)
-
- t2 = Test(s2)
- t2.setEraseColor(Qt.green.light(180))
- s2.setResizeMode(t2, QSplitter.KeepSize)
- s2.moveToFirst(t2)
-
- s3 = QSplitter(Qt.Horizontal, s1, "bottom")
-
- t3 = Test(s3)
- t3.setEraseColor(Qt.red)
- t4 = Test(s3)
- t4.setEraseColor(Qt.white)
-
- t5 = Test(s3)
- t5.setMaximumHeight(250)
- t5.setMinimumSize(80,50)
- t5.setEraseColor(Qt.yellow)
-
- s1.setOpaqueResize(1)
- s2.setOpaqueResize(1)
- s3.setOpaqueResize(1)
-
- a.setMainWidget(s1)
- s1.show()
- a.exec_loop()