Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
5.1.0
-
None
-
Windows 8 x64/Windows 7 x64, Qt 5.1.0 MinGW OpenGL
Description
I try to resize Items in a ListView according to my window size. That works, but the first item of a ListView with sections gets a wrong position. Try this and then resize the Window/Rectangle while it is running. This DOES work, when the size is changed before the model of the ListView is filled. This does not work, if the size is changed while everything is loaded and displayed.
import QtQuick 2.0 Rectangle { id: mainWindow width: 800 height: 600 ListModel { id: lm ListElement { category: "Human Players" name: "Player 1" } ListElement { category: "Human Players" name: "Player 2" } ListElement { category: "AI Players" name: "AI 1" } ListElement { category: "AI Players" name: "AI 2" } } ListView { model: lm delegate: Text { text: name font.pixelSize: 20 * (mainWindow.height / 600) } section.property: "category" section.delegate: Text { text: section font.pixelSize: 40 * (mainWindow.height / 600) } anchors.fill: parent } }