[SOLVED] Rows get deleted automatically from custom QAbstractListModel of PathView



  • I am working on a Symbian application, which displays several pages each containing simple text content. I have inherited QAbstractListModel to create a model for the pages, and I'm using PathView to display them like instructed here: http://www.developer.nokia.com/Community/Wiki/How_to_create_a_Page_Control_component_in_QML. The content of each page is contained in another custom model inherited from QAbstractListModel, and I'm using a Flickable-Column-Repeater to display the text. Each row contains just a single Text element.

    The problem is that, when the total amount of text rows grows to something like a few hundred, some of the pages in the page model get deleted, and the app crashes when I flick the view to a page, which doesn't exist anymore. I've tried to debug this, but haven't found out who deletes the pages and why.

    This happens both on the device and in the simulator. Originally I thought I might be running out of memory, but increasing the application heap size doesn't seem to have any effect.

    Any ideas on what might be the problem, or how I could debug this further?



  • The root cause turned out to be that I had not set the page model to be a parent for the pages. See http://qt-project.org/forums/viewthread/23497/ for more info.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.