Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.2.1, 5.3.0, 5.4.0, 5.5.0, 5.15.3, 6.2.0 RC2
Description
In the following example, currentIndex is set to 50, but the resulting currentIndex is 0.
import QtQuick 2.0 import QtQuick.Window 2.0 Window { id: window width: 400 height: 400 visible: true ListView { anchors.fill: parent highlightRangeMode: ListView.StrictlyEnforceRange preferredHighlightBegin: height / 3 preferredHighlightEnd: height / 3 * 2 currentIndex: 50 model: 100 delegate: Text { id: delegateText text: modelData width: ListView.view.width height: ListView.view.height / 3 font.bold: ListView.isCurrentItem horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter font.pixelSize: 16 } } }
Attachments
Issue Links
- is duplicated by
-
QTBUG-93451 Binding with Listview height are not correctly calculated
- Closed
- relates to
-
QTBUG-66801 Tumbler: setting initial currentIndex selects wrong item with wrap disabled
- Open
-
QTBUG-43555 ListView's currentIndex changes when view is resized
- Closed
-
QTBUG-93293 QML: Initial setting of ListView currentIndex is ignored with dynamic model generation
- Reported
-
QTBUG-69278 ListView's contentY isn't updated when the delegateHeight starts off at 0
- Closed
-
QTBUG-86744 ListView.isCurrentItem not available until model is refreshed
- Closed
-
QTBUG-104204 Meta-task for issues related to ListView filling a window
- Reported