Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86339

Qt Designer Ignores Layout Alignment

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.15.0
    • Tools: Designer
    • None

    Description

      The designer does not allow you to set the layout alignment by right clicking on a layout, it can only be set for widgets that way. The only way to set the alignment of layouts directly seems to be through code. If I manually put the alignment property into the UI form, it will show at runtime, but is not respected by the designer or its preview display.

      <layout class="QVBoxLayout" name="propertiesLayout">
       <property name="alignment">
        <set>Qt::AlignTop</set>
       </property>

      A workaround is to add the layout to a widget and set the alignment of the widget, or make use of spacer items. Neither of these are ideal as they require much bigger diff changes to a layout.

       

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            RobertBColton Robert B. Colton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes