Hi,

Any idea how to center the delegate item which has smaller dimensions compared to the cell dimensions?
They're always aligned on the top left.

Grid View Code:
Qt Code:
  1. GridView
  2. {
  3. id: preferencesList
  4. anchors.horizontalCenter: parent.horizontalCenter
  5. anchors.verticalCenter: parent.verticalCenter
  6. width: 350; height: 350
  7. cellWidth: 175; cellHeight: 175
  8. delegate: delegates {}
  9. }
To copy to clipboard, switch view to plain text mode 

delegates:
Qt Code:
  1. Item
  2. {
  3. id: root
  4. width: GridView.view.cellWidth
  5. height: GridView.view.cellHeight
  6.  
  7. Rectangle
  8. {
  9. width: 130
  10. height: 130
  11. anchors.centerIn: parent.Center // this is not working
  12. }
  13. }
To copy to clipboard, switch view to plain text mode 

I already tried putting the center anchor in the root item, still not working.
Thanks.