Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-9367

Wrong x, y when setting Item as child of other Object

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • QDS 4.0
    • MCU support
    • None

    Description

      Design Studio from staging installer (rev 62334c2b7a) on Windows 10.

      Steps to reproduce:

      1. Create a new Qt for MCUs project (Width 800, Height 600)
      2. Drag and drop a Rectangle in the canvas
      3. Layout > Set Anchor component vertically and horizontally
      4. Make the Text item a child of the Rectangle item by drag and drop in the Navigator Pane

      In the Code view the Text item has now x: 46, y: 93
             

              Text {
                  x: 46
                  y: 93
                  text: qsTr("Hello UntitledProject2")
                  anchors.centerIn: parent
              }

      While the preview shows the Text item as centered in the Rectangle, when running the QML code in QtCreator or on MCU via qmlprojectexporter the Text item is not centered in its parent.

      Attachments

        1. image-2023-11-07-13-33-26-375.png
          image-2023-11-07-13-33-26-375.png
          14 kB
        2. step1.PNG
          step1.PNG
          145 kB
        3. step2.PNG
          step2.PNG
          155 kB
        4. step3.PNG
          step3.PNG
          162 kB
        5. step4.PNG
          step4.PNG
          162 kB

        Issue Links

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

          Activity

            People

              thohartm Thomas Hartmann
              dbortolotti Daniele Bortolotti
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes