[PySide] Issue with QStandardItemModel, QSortFilterProxyModel and fetchMore
Tony Barbieri
greatrgb at gmail.com
Mon Mar 3 16:40:22 CET 2014
Hello!
I have a QTreeView which I am populating using a QStandardItemModel. I
also have data that needs to only be queried once a certain level of the
tree is accessed. I am using the fetchMore method and it appears to work
great.
Unfortunately once I add in QSortFilterProxyModel, there are extra empty
items being added to the tree. I'm not sure where it's coming from or how
I can avoid it. Below is the fetchMore method I'm using. I appreciate any
thoughts!
def fetchMore(self, index)
parent = self.itemFromIndex(index)
self.beginInsertRows(index, 0, len(sg_data))
for item in sg_data:
parent.appendRow(item)
self.endInsertRows()
--
-tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140303/834265f4/attachment.html>
More information about the PySide
mailing list