Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12, 5.15
-
None
Description
If a QQC TableView has more entries than its height would fit, the Repeater in the Column with the id: rowfiller in the BasicTableView.qml calculates a negative model size which results in error messages like:
Model size of -1 is less than 0
This can be tested with a minimal example:
// main.qml import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 1.4 as QQC Window { width: 640 height: 80 visible: true title: qsTr("Model Size Issue") QQC.TableView { anchors.fill: parent model: ListModel { ListElement { name: "Row 1" } ListElement { name: "Row 2" } ListElement { name: "Row 3" } ListElement { name: "Row 4" } // add/remove elements beyond the 4th to get the error message ListElement { name: "Row 5" } } QQC.TableViewColumn { role: "name" title: "Rows" } } }
A similar (closed) issue had been raised for the TreeView some time ago:
QTBUG-72543