summaryrefslogtreecommitdiffstats
path: root/tests/QtGui/qlayout_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/qlayout_test.py')
-rw-r--r--tests/QtGui/qlayout_test.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/QtGui/qlayout_test.py b/tests/QtGui/qlayout_test.py
index 72c6d173..999e4c9b 100644
--- a/tests/QtGui/qlayout_test.py
+++ b/tests/QtGui/qlayout_test.py
@@ -2,7 +2,8 @@ import unittest
import sys
from helper import UsesQApplication
-from PySide.QtGui import QLayout, QWidget, QPushButton, QWidgetItem, QHBoxLayout
+from PySide.QtCore import *
+from PySide.QtGui import *
class MyLayout(QLayout):
def __init__(self, parent=None):
@@ -95,5 +96,17 @@ class QLayoutTest(UsesQApplication):
self.assertRaises(RuntimeError, w.setLayout, l)
+ def testQFormLayout(self):
+ w = QWidget()
+ formLayout = QFormLayout()
+ spacer = QSpacerItem(100, 30)
+ formLayout.setItem(0, QFormLayout.SpanningRole, spacer)
+ w.setLayout(formLayout)
+ w.show()
+ QTimer.singleShot(10, w.close)
+ self.app.exec_()
+ del w
+ self.assertRaises(RuntimeError, spacer.isEmpty)
+
if __name__ == '__main__':
unittest.main()