If a layout is a child of FormLayout the setStretch calls are not generated.
Besides if grid-position[0] == 0 the form does not stretch as in QT creator
(role is marked as label instead of field).
I admit I don't really know the pyuic internals. This hack fixes the issue I
found, hope it makes some sense...
--
Giuseppe Corbelli
WASP Software Engineer, Copan Italia S.p.A
Phone: +390303666104 Fax: +390302659932
E-mail: [email protected]
--- uic/uiparser_orig.py 2010-09-20 12:14:04 +0000
+++ uic/uiparser.py 2010-09-22 13:44:27 +0000
@@ -406,14 +401,15 @@
if self.stack.topIsLayout():
top_layout = self.stack.peek()
gp = elem.attrib["grid-position"]
if isinstance(top_layout, QtGui.QFormLayout):
- if gp[1]:
+ if gp[3]:
role = QtGui.QFormLayout.FieldRole
else:
role = QtGui.QFormLayout.LabelRole
-
+ self.configureLayout(elem, layout)
top_layout.setLayout(gp[0], role, layout)
else:
self.configureLayout(elem, layout)
top_layout.addLayout(layout, *gp)
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt