Reputation: 6958
I have an issue with a list/detail pattern. I have an Article class, inheriting from QObject
, defining some properties (title
, updated
and content
being the ones that matters for now). To populate my (QML) ListView
, I have a C++ GroupDataModel
, filled with some Article*
. Here's my list's onTriggered
:
onTriggered: {
if (indexPath.length > 1) {
currentArticle = dataModel.data(indexPath);
var page = articlePageDefinition.createObject();
nav.push(page)
}
}
As you can guess, the articlePageDefinition
defines a page using the upper currentArticle
property.
Now, when I display the articlePage once, it's working fine. I can go back, click on the same list item, display the same Article
details, works great. But when I pick a second article, the app kind of freezes. I can go back in my navigation pane, but I can't click on list items anymore. I tried to add some logs, the onTriggered
is stuck on currentArticle = dataModel.data(indexPath);
. At this point, I can log every property of dataModel.data(indexPath)
without any issue. I tried to not create/push the page, simply affect currentArticle
and display some of its properties, it's working fine too. I really don't understand what I am doing wrong here, any help appreciated.
In case you need to see more code, everything is here: https://github.com/Kernald/tt-rss-bb10/tree/e29e3b616aa179dd42f66804ecc20a6a45b6bb22
Upvotes: 0
Views: 274
Reputation: 1155
I had a similar behavior of my app, but I did not inspect your github code if the reason can be the same. I think you can verify that more quickly than me.
When removing and adding a list item with the same index, the code gets stucked. I removed an entry on user action and added a new one at that place, and it got stuck. This is a known issue to BB10, I found here: https://developer.blackberry.com/cascades/download/releasenotes/#known
Upvotes: 0
Reputation: 1921
Here what can cause the problem your are having:
Upvotes: 1