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

Crash when setting Layout invisible

    XMLWordPrintable

Details

    Description

      The application crashes when setting a control to invisible that has a ColumnLayout as a contentItem.

      Error message:

      Qt for MCUs error: Core:Layout_InvalidValue:129, line: 94, params: 0, 0, 0.
      See https://doc.qt.io/QtForMCUs/qtul-error-handling.html for more information. 

      Example code:
      (Click on the green rectangle on the right)

      import QtQuick
      import QtQuick.Layouts
      import QtQuick.Controls
      
      Item
      {
          Button
          {
              id: button
              anchors.left: parent.left
              width: 200
              height: 200
              contentItem: ColumnLayout
              {
                  Text
                  {
                      text: "Text"
                      color: "red"
                  }
              }
          }
      
          Rectangle
          {
              anchors.right: parent.right
              width: 200
              height: 200
              color: "green"        
              MouseArea
              {
                  anchors.fill: parent
                  onClicked:
                  {
                      button.visible = false
                  }
              }
          }
      }

      Attachments

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

        Activity

          People

            kwkim Kwangsub Kim
            gruberd Dennis Gruber
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes