I resolved it by not calling beginInsertRows and endInsertRows...perhaps the appendRow call is already taking care of notifying the proxy and view? Seems to have cleared up the issue.
Thanks! -tony On Mon, Mar 3, 2014 at 10:40 AM, Tony Barbieri <[email protected]> wrote: > 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 > -- -tony
_______________________________________________ PySide mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/pyside
