Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-16959

Crash when using Grid.TopToBottom flow with Repeater inside Grid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.4
    • 4.7.1
    • None
    • Microsoft Windows XP Professional, Version 2002, Service Pack 3
    • 49df52abc004419f35bb6b508fb681c028a7c679

    Description

      The following QML crashes:

      GridFlowBug.qml
      import Qt 4.7
      
      Item {
          ListModel {
              id: theModel
      
              ListElement { name: "Item 1"; backColor: "red" }
              ListElement { name: "Item 2"; backColor: "green" }
              ListElement { name: "Item 3"; backColor: "blue" }
              ListElement { name: "Item 4"; backColor: "cyan" }
              ListElement { name: "Item 5"; backColor: "orange" }
              ListElement { name: "Item 6"; backColor: "gray" }
              ListElement { name: "Item 7"; backColor: "black" }
              ListElement { name: "Item 8"; backColor: "white" }
              ListElement { name: "Item 9"; backColor: "steelblue" }
              ListElement { name: "Item 10"; backColor: "pink" }
              ListElement { name: "Item 11"; backColor: "gold" }
              ListElement { name: "Item 12"; backColor: "lightgray" }
              ListElement { name: "Item 13"; backbackColor: "yellow" }
          }
      
          Grid {
              id: grid
              anchors {
                  fill: parent
                  leftMargin: 50
                  topMargin: 50
                  bottomMargin: 50
                  rightMargin: 50
              }
      
              rows: 2
              flow: Grid.TopToBottom
      
              Repeater {
                  model: theModel
                  Rectangle {
                      color: backColor
                      width: 100
                      height: 100
                      radius: 10
                      border.width: 1
                  }
              }
          }
      }
      
      

      If the Grid.LeftToRight flow is used or the items inside Grid component are defined directly (i.e. several Rectangles instead of Repeater + model) everything works fine.

      I've attached an application which reproduces the issue.

      Attachments

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

        Activity

          People

            aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
            chalup Jerzy Chalupski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes