On Wed, 03 Nov 2010 16:56:02 +0100, Linos <[email protected]> wrote:
> Hello Phil,
>       i have a problem with this version and a QFormLayout, this code in the
>       .ui file:
> 
>          <item row="8" column="1">
>              <widget class="QSpinBox" name="avisoMinimaRotacionSpinBox">
>               <property name="minimumSize">
>                <size>
>                 <width>80</width>
>                 <height>0</height>
>                </size>
>               </property>
>              </widget>
>             </item>
>             <item row="8" column="0">
>              <widget class="QLabel" name="avisoMinimaRotacionLabel">
>               <property name="text">
>                <string>AVISO MIN ROTACION:</string>
>               </property>
>               <property name="buddy">
>                <cstring>avisoMinimaRotacionSpinBox</cstring>
>               </property>
>              </widget>
>             </item>
> 
> ends like this in the generated file:
> 
>       self.avisoMinimaRotacionSpinBox =
QtGui.QSpinBox(self.datos_generales_tab)
>          self.avisoMinimaRotacionSpinBox.setMinimumSize(QtCore.QSize(80,
>          0))
>  
>
self.avisoMinimaRotacionSpinBox.setObjectName(_fromUtf8("avisoMinimaRotacionSpinBox"))
>          self.formLayout.setWidget(8, QtGui.QFormLayout.LabelRole, 
> self.avisoMinimaRotacionSpinBox)
>          self.avisoMinimaRotacionLabel =
>          QtGui.QLabel(self.datos_generales_tab)
>  
>
self.avisoMinimaRotacionLabel.setObjectName(_fromUtf8("avisoMinimaRotacionLabel"))
>          self.formLayout.setWidget(8, QtGui.QFormLayout.FieldRole, 
> self.avisoMinimaRotacionLabel)
>          self.avisoMaximaRotacionLabel =
>          QtGui.QLabel(self.datos_generales_tab)
> 
> should be the reverse obviously, the .ui file it is rendered correctly
in
> QT 
> Designer, could this be other pyuic bug?

Patch attached.

Thanks,
Phil
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

Reply via email to