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

anchoring to parent within an inline component will make the qmltocpp crash

    XMLWordPrintable

Details

    • 0f76b3f7, 5793ed46, a0e954fe.

    Description

      qmltocpp crashes when one has inline component which has anchor property declared and it is binding to its parent.

      Arguably this is considered bad practice for a component to refer to its parent but this works in normal Qt and we cannot allow qmltocpp to crash.

      Snippet which reproduces the issue:

      import QtQuick
      
      Rectangle {
          id: myWindow
          height: 800
          width: 472
          color: "pink"
          component Comp : Rectangle {
              //commenting out the anchoring below will make the build to pass
              anchors.centerIn: parent
              width: 100
              height: 100
              color: "purple"
          }
          Comp{
              //doing the anchoring within the component works and can be used as a workaround
              anchors.centerIn: parent
          }
      
      }
      

      Attachments

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

        Activity

          People

            k0rahman Karim Abdelrahman
            foxxx Tuukka Kettunen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes