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

GridView doesn't support header property when operations on cellWidth & cellHeight

XMLWordPrintable

      GridView doesn't support header property when there are operations on cellWidth & cellHeight.

      The application crashes before being displayed.

      Here is a simple example :

      import QtQuick 2.6
      
      GridView {
          id: grid
          width: 400
          height: contentHeight
      
          cellWidth: width/Math.round(width/170)
          cellHeight: cellWidth*4/3
      
          interactive: false
      
          model: ListModel {
              id: myList
          }
      
          header: Component {
              Rectangle {
                  width: grid.cellWidth
                  height: grid.cellHeight
                  color: "red"
              }
          }
      
          delegate: Component {
              Rectangle {
                  width: grid.cellWidth
                  height: grid.cellHeight
                  color: "blue"
              }
          }
      }
      

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

            Unassigned Unassigned
            vkaestle67 Vincent Kaestle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes