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

Details

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

    Description

      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
                      }
                  }
      
              }
          }
      

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes