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
    • Not Evaluated
    • None
    • 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. step1.PNG
          step1.PNG
          145 kB
        2. step2.PNG
          step2.PNG
          155 kB
        3. step3.PNG
          step3.PNG
          162 kB
        4. step4.PNG
          step4.PNG
          162 kB

        Activity

          People

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

            Dates

              Created:
              Updated: