diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-03-30 18:37:42 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-03-30 18:49:07 -0300 |
commit | 9ffb2ef542a8a5d3e89fe913ea760208eed108a3 (patch) | |
tree | 37b4c44f7b3c10c33a8100c441701a334a44da95 /tests | |
parent | 4239b567107e9b800d38f9c1d1f02a23009e9858 (diff) | |
download | pyside-9ffb2ef542a8a5d3e89fe913ea760208eed108a3.tar.gz pyside-9ffb2ef542a8a5d3e89fe913ea760208eed108a3.tar.xz pyside-9ffb2ef542a8a5d3e89fe913ea760208eed108a3.zip |
Fix bug 712 - "QtGui.QFormLayout doesn't have setItem() function"1.0.1
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtGui/qlayout_test.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/QtGui/qlayout_test.py b/tests/QtGui/qlayout_test.py index 72c6d17..999e4c9 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() |