[PySide] Issue with QStandardItemModel, QSortFilterProxyModel and fetchMore
greatrgb at gmail.com
Mon Mar 3 17:44:59 CET 2014
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.
On Mon, Mar 3, 2014 at 10:40 AM, Tony Barbieri <greatrgb at gmail.com> wrote:
> 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
> 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
> def fetchMore(self, index)
> parent = self.itemFromIndex(index)
> self.beginInsertRows(index, 0, len(sg_data))
> for item in sg_data:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PySide