[PyQt] pyuic4 gridlayout problem

Michele Petrazzo - Unipex michele.petrazzo at unipex.it
Sat Sep 12 12:31:57 BST 2009


Hi list,
I just create a form with qtdesigner with a gridlayout, put two widgets
inside and set the property layoutRowStretch to 0,1 (default 0,0)
Now I'm trying to transform it to the python code with pyuic4, but there
is a problem because pyuic4 "forgot" to translate the "RowStretch" value.
Doing a test with uic-qt4, I see:
gridLayout->setRowStretch(1, 1);

and on .ui
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1">

but on the .py generated no.

Doing it inside my code (self.gridLayout.setRowStretch(1, 1)) it works
without problem.

Michele


More information about the PyQt mailing list