Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.5.0 RC
-
None
-
Mac OS 10.10.4, Xcode 6
Description
Create a simple ListView. When you change its model property value to a different integer value, the ListView automatically changes its currentIndex to 0, even when the currentIndex previous value was -1. This seems wrong.
The currentIndex value of -1 is used by the programmer to indicate there is no current selection and that the ListView is to clear its currentItem in the ListView. Subsequently changing the model property value should not force there to be a currentIndex of 0 and therefore a current Item. It should honor the currentIndex == -1 and therefore not manipulate the currentIndex at that time.
This causes problems in my app because the ListView auto-update to currentIndex 0 comes at a time which stomps the manual index I wished to set based on another parameter value, and often it is non-zero.
Isn't the the currentIndex setting of -1 not supposed to be overridden automatically by the widget?
Attachments
Issue Links
- resulted from
-
QTBUG-26604 ListView/GridView do not reset currentIndex when the model changes
- Closed