ListView duplicating last item on update in Windows
-
Hey
I have a ListView with a custom C++ model. It's actually the same model documented here: http://doc.qt.nokia.com/4.7/gettingstartedqml.htmlIt's a simple folder/file model. The ListView is listing the files of a certain type (.txt) within a chosen folder.
The problem comes when a new file is added to the folder. I move the list with my mouse and a new item is added to the list. The new item (at the end of the list), now has the same name as the item before it whereas it should instead have the new filename. On Symbian this does not occur.
Workaround: If I reset the model using model = logDir.files whenever the directory changes, the correct name appears. Though, I shouldn't have to do this?
Code:
@
Component {
id: filedelegate
Item {
height: 50
x: 20
width: parent.width - 40
Text {
id: nameText
text: name.replace(/.txt/g, '')
// ...
}
}
}ListView {
id: loglist
width: parent.width; height: parent.height - 80;
x: 20
y: 20
spacing: 10
delegate: filedelegate
model: logDir.files
highlight: Rectangle {
//...
}
}@ -
It sounds like a bug. Can you report it with a small example at bugreports.qt.nokia.com?