[PyQt] pyuic5 generated code missing alignment attribute?

Juhani Åhman juhanipm at gmail.com
Tue Sep 2 18:58:05 BST 2014


I tried generating UI code with pyuic5 from a ui file (see attachments), 
but it seems to miss an alignment attribute as my QHBox is aligned to 
the left instead of center.
The uic tool generates code with the align attribute in it, so I suspect 
it could be bug.

specifically I get

self.verticalLayout_2.addWidget(self.widget)

instead of

self.verticalLayout_2.addWidget(self.widget, 
alignment=QtCore.Qt.AlignHCenter)

I'm using version pyqt5 5.3.1-1.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: align_test.cpp
Type: text/x-c++src
Size: 4700 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140902/0c8a423b/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: align_test.py
Type: text/x-python
Size: 3641 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140902/0c8a423b/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: align_test.ui
Type: application/x-designer
Size: 2569 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140902/0c8a423b/attachment.bin>


More information about the PyQt mailing list