summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml7
-rw-r--r--tests/QtGui/qlayout_test.py15
2 files changed, 19 insertions, 3 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index dc6df54d..a0b84fc7 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -5079,9 +5079,12 @@
</modify-function>
<!-- ### See bug 748 -->
<modify-function signature="getItemPosition(int,int*,QFormLayout::ItemRole*)const" remove="all" />
- <!-- ### See bug 749 -->
- <modify-function signature="setItem(int,QFormLayout::ItemRole,QLayoutItem*)" remove="all"/>
<!-- ### -->
+ <modify-function signature="setItem(int,QFormLayout::ItemRole,QLayoutItem*)">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
</object-type>
<object-type name="QGraphicsGridLayout" >
<modify-function signature="addItem(QGraphicsLayoutItem*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
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()