Op den Dingsdag 09 November 2010 Klock 19:34:54 hett Phil Thompson schreven:
> On Tue, 09 Nov 2010 19:25:28 +0100 (CET), Marián Kyral <[email protected]>
> > As you can see, labels have assigned FieldRole and fields have assigned
> > LabelRole.
> >
> > self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
> > self.label)
> > self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
> > self.lineEdit)
> >
> > This problem is at least in pyqt 4.8.0 and 4.8.1.
>
> A patch to fix it was posted to the list a few days ago.
Since this subject is much better and easier to find than "ANN: PyQt v4.8.1
Released", I am re-posting the patch here. (Took me some minutes to find it
again.)
HTH,
Hans
diff -r cab48c709c18 pyuic/uic/uiparser.py
--- a/pyuic/uic/uiparser.py Fri Oct 29 15:39:46 2010 +0100
+++ b/pyuic/uic/uiparser.py Thu Nov 04 11:48:45 2010 +0000
@@ -832,7 +832,7 @@
def _form_layout_role(grid_position):
if grid_position[3] > 1:
role = QtGui.QFormLayout.SpanningRole
- elif grid_position[1] == 0:
+ elif grid_position[1] == 1:
role = QtGui.QFormLayout.FieldRole
else:
role = QtGui.QFormLayout.LabelRole
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt