Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2932

QT Widget Designer saving .ui file make AlignmentFlag Error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.7.3, 6.8.0.2
    • Other, Tooling
    • None

    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&gt;Form</class&gt;
       <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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              eefkenc KenC Neko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes