Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
5.0.1
-
None
-
Qt 5.0.1 (official binaries) Linux
Description
By default GridView lays out its children from left to right and top to bottom. If there is not enough space on the right side, a new row is started.
Unfortunately if the width of the GridView is not a multiple of the cellWidth the items on the right side are partially cut off as shown on the attached screenshot.
Fully working example below:
import QtQuick 2.0 Rectangle { width: 900 height: 600 color: "gray" GridView { id: view model: 10 clip: true cellWidth: 350 cellHeight: 150 anchors.fill: parent anchors.margins: 10 delegate: Rectangle { height: view.cellHeight width: view.cellWidth color: "lightblue" border.color: "white" Text { anchors.centerIn: parent text: index } } } }