Strange behavior on PathView
I'm observing a strange behavior on PathView. I'm using an AbstractItemModel as model for a PathView. The model is populated by using a QTimer after the initial app setup (after creating the view etc):
@void MyModel::loadItems(const QString &file)
// Load, parse and put items into the list
m_items = items;
Sadly, this fails. The PathView shows no entries, but if I call setItems() before I create the declarative view it works.
What's really strange is that ListView works with the QTimer-solution. Any ideas?
Looks like PathView simply doesn't use reset signals. Have you tried with beginInsertRows()/endInsertRows() ?
PathView should work with the reset signals (autotest tst_QDeclarativePathView::resetModel() tests this). If you can provide an example to reproduce this (preferably in the "bug tracker":http://bugreports.qt.nokia.com) we can look into it further.
Thanks guys. I'll try to "scale down" the code to a simple example and see if it happens. If the problem persists I'll file a bug report.
I'll also post the result here.
Ok, I have filed a bug on this which can be found at http://bugreports.qt.nokia.com/browse/QTBUG-13017
The bug report contains a small C++/Quick app which demonstrates the issue.
Tried by myself at Qt 4.7 beta1. Behavior is similar to what mario described. Maybe something with newer version can test (beta2 or not too old master build) and post results here?
Kinda feels good I'm not the only one :)
I tried it with both beta1 and beta2, same behavior.
A fix has been pushed to the qt-qml staging repo. Thanks for the bug report!
mbrasser, this fix will appear at 4.7.0?
It's unlikely that it will appear in 4.7.0 at this point -- most likely 4.7.1 .