Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-16

anchoring in multiple childs of a Rectangle inside a component fails to build with Qt for MCU 1.4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • Qt for MCUs 1.4
    • QML, QUL Team
    • None
    • Windows
    • 0
    • Sprint 3.1/2021

      While building below code with Qt for MCU 1.4, it fails with qmltocpp. whereas the same is building properly with Qt for MCU 1.3. Removing any of the anchoring within the "cardArea" Rectangle solves the building issue.

          Component {
              id:mycomponent
      
              Item {
                  width: gridCellWidth
                  height: root.height
      
                  Rectangle {
                      id: cardBorder
                      anchors.fill: parent
                      color: "Red"
                      property int borderWidth: 1
                  }
      
                  Rectangle {
                      id: cardArea
                      width: parent.width - (cardBorder.borderWidth*2)
                      height: parent.height - (cardBorder.borderWidth*2)
                      anchors.centerIn: parent
                      color: "#000000"
      
                      Image {
                          width: 42
                          height: 42
                          anchors {
                              top: parent.top
                              topMargin: 10
                              left: parent.left
                              leftMargin: 10
                          }
                          fillMode: Image.PreserveAspectFit
                      }
      
                      Text {
                          id: bodyText
                          width: parent.width - (1 * 2)
                          anchors {
                              top: parent.top
                              topMargin: 20
      
                              left: parent.left
                              leftMargin: 20
                          }
                          text: /*model.name*/ "test"
                          color: "Blue"
                          font.pixelSize: 12
                          horizontalAlignment: Text.AlignLeft
                          verticalAlignment: Text.AlignTop
                      }
                  }
      
              }
          }
      

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

            Unassigned Unassigned
            sasekar Sabari Chandra Sekar Ramu Sankaranarayanan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes