[Qt-interest] QTreeView::rowsInserted internal representation of the model has been corrupted, resetting.
venkateswarlu kareti
kareti_venky at yahoo.com
Fri May 22 13:15:28 CEST 2009
Hi All
I am getting an error in using QTreeView With custom model.
I extended QAbstractItemModel and override rowsInsert() method.
In my public slot i am calling as
beginInsertRows(parentIndex,firstrow,firstrow) //i am inserting only one row
insertRow(firstrow,parentIndex);
endInsertRows();
emit dataChanged(parentIndex.child(firstrow,firstrow));//inserted one row
emit expand(parentIndex);
//i want to expand the parent
insertRows(row,count,parentIndex)
//implementation of insertrows
{
TreeItem* parentItem = static_cast<TreeItem*> (parentIndex.internalPointer());
TreeItem* childIten=new TreeItem(parentItem); //custom class to represent tree Item.
parentItem->insertItem(row,childItem);//this will inset the child item in the childitems list of parentitem.
}
If i insert one item at a time it is fine.
If i insert bulk of items ,programatically, it is giving waring msg
"QTreeView::rowsInserted internal representation of the model has been corrupted, resetting.". This is not for each file 9 times/500 files approximately.
"How to get rid of this. Please Help me"
Thanks in advancd.
Bollywood news, movie reviews, film trailers and more! Go to http://in.movies.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090522/1bb36080/attachment.html
More information about the Qt-interest-old
mailing list