Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.9.4
-
None
Description
- start example
- see working GridLayout
- increase or decrease
- see bugged GridLayout
- if you change width and height with Layout stuff -> it works
- if you hard code width and height -> it works
import QtQuick 2.6 import QtQuick.Layouts 1.3 import QtQuick.Controls 2.2 import QtQuick.Window 2.0 ApplicationWindow { id: mainWindow visible: true property int baseSize: 20 Component.onCompleted: app.quickLoadGame(); RowLayout { Button { text: "+"; onClicked: repeater.model += 1; } Text { text: repeater.model; } Button { text: "-"; onClicked: repeater.model -= 1; } GridLayout { columns: 8 Repeater { id: repeater model: 16 Rectangle { color: "red" width: baseSize height: baseSize // Layout.preferredWidth: baseSize // Layout.preferredHeight: baseSize Text { anchors.fill: parent; text: index; } } } } } }