The layoutStretch property of QHBoxLayout and QVBoxLayout in designer
should be compiled to layout.setStretch() calls.

The code to do this is already present in PyQt4.uic.uiparser, but
never triggered because of an error in the types hierarchies defined
in PyQt4.uic.Compiler.qtproxies (QHBoxLayout and QVBoxLayout should be
descendants of QBoxLayout instead of QLayout).

Attached is a patch (made against
PyQt-x11-gpl-4.7.1-snapshot-20100120.tar.gz) and a .ui file showing
the issue.

-- 
Lup

Attachment: layoutStretch_example.ui
Description: application/designer

--- uic/Compiler/qtproxies.py	2010-01-21 04:36:58.000000000 +0100
+++ /usr/lib/python2.6/dist-packages/PyQt4/uic/Compiler/qtproxies.py	2010-01-28 01:38:30.864992872 +0100
@@ -237,8 +237,9 @@
     class QButtonGroup(QtCore.QObject): pass
     class QLayout(QtCore.QObject): pass
     class QGridLayout(QLayout): pass
-    class QHBoxLayout(QLayout): pass
-    class QVBoxLayout(QLayout): pass
+    class QBoxLayout(QLayout): pass
+    class QHBoxLayout(QBoxLayout): pass
+    class QVBoxLayout(QBoxLayout): pass
     class QFormLayout(QLayout): pass
     
     class QWidget(QtCore.QObject):
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to