Description
Steps to reproduce:
- Save any .ui that have set Layout Alignment for a widget in a layout
The saved .ui file will have strange errors
if using AlignTop for a widget in a layout will get
<item alignment="Qt::AlignmentFlag::Qt::AlignmentFlag::AlignTop">
if using AlignHCenter and AlignTop for a widget in a layout will get
<item alignment="|Qt::AlignmentFlag::AlignTop">
<?xml version="1.0" encoding="UTF-8"?><ui version="4.0"> <class>Form</class> <widget class="QWidget" name="Form"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>400</width> <height>300</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item alignment="Qt::AlignmentFlag::Qt::AlignmentFlag::AlignTop"> <widget class="QFrame" name="frame"> <property name="frameShape"> <enum>QFrame::Shape::StyledPanel</enum> </property> <property name="frameShadow"> <enum>QFrame::Shadow::Raised</enum> </property> </widget> </item> </layout> </widget> <resources/> <connections/> </ui>
I only tested in win10 and win11. I did not encounter this issue in PySide6 version 6.7.2. However, the issue appears in versions 6.7.3, 6.8.0, and 6.8.0.2. Based on this, it seems that the issue was introduced in a version released after 6.7.2.
Attachments
Issue Links
- duplicates
-
QTBUG-129503 Reg->6.7.3: In Qt Designer, the widgets' Layout Alignment option is ineffective (unable to generate corresponding code)
- Closed