[PyQt] pyuic4 assign invalid roles to labels and fields in Form layout

Hans Meine meine at informatik.uni-hamburg.de
Tue Nov 16 13:04:00 GMT 2010


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 <mkyral at email.cz>
> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyuic4.diff
Type: text/x-patch
Size: 494 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101116/1d77e85e/attachment.bin>


More information about the PyQt mailing list