Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-31374

Widget Designer of QtCreator 14.0.0 generates wrong code for 'vertical spacer' with Qt 5.15.17

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 14.0.0
    • Widget Designer
    • None
    • Windows

    Description

      If a dialog contains a vertical spacer, an incorrect code is created in ui_????.h together with Qt 5.14.17.

      Screenshot vertical spacer with QtCreator 13.0.2:

      Created and compiled with QtCreator 13.0.2 and Qt 5.14.17:
      verticalSpacer = new QSpacerItem(20, 478, QSizePolicy::Minimum, QSizePolicy::Expanding);
      -> Correct

      Created and compiled with QtCreator 14.0.0 and Qt 5.14.17:
      verticalSpacer = new QSpacerItem(20, 478, QSizePolicy::Expanding, QSizePolicy::Minimum);
      -> Wrong, parameter.  Parameter hPolicy and vPolicy are swapped.

      The difference can be found in the file ???????.ui:

      ui-File created with QtCreator 13.0.2:
      <enum>Qt::Vertical</enum>

      ui-File created with QtCreator 14.0.0:
      <enum>Qt::Orientation::Vertical</enum>

      It looks like the uic.exe from Qt 5.14.17 cannot handle the new ?????.ui file generated from QtCreator 14.0.0 correctly.

      Possible solutions:

      • QtCreator automatically recognizes that it is a Qt 5.x code and generates a correspondingly compatible ui file
      • A setting for the QtCreator Designer that it generates Qt 5.x compatible code
      • Bugfix for uic.exe of Qt 5.14.17

       

      Attachments

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              sgluekler Stefan Glükler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes