Skip to content

QAbstractItemModel/QAbstractListModel: canFetchMore and fetchMore #98

Open
@rubdos

Description

@rubdos

Hi!

I have a QAbstractListModel that I would want to populate asynchronously (or lazily, as far as Qt is concerned) through QAbstractItemModel::canFetchMore and QAbstractItemModel::fetchMore. These are not exposed as far as I can tell in this crate.

Now, I would be prepared to implement this and get a PR out here, but I'm uncertain how to proceed. listmodel.rs has quite a few statements like

// FIXME! code duplication with impl QAbstractItemModel

... and "just" naively implementing these methods would make things (much) worse: duplicated code across ItemModel and ListModel + default implementations that are the same in both and in Qt. Maybe this code duplication should be fixed first?

I'm interested in hearing your thoughts about this! Maybe you're also interested in reading this little proof of concept that I made last month, and while tangentially related, it's probably food for another issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-wrappersArea: Wrappers and bindingsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions