Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSortFilterProxyModel updating too frequently
Forum Updated to NodeBB v4.3 + New Features

QSortFilterProxyModel updating too frequently

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 533 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aa13q
    wrote on last edited by
    #1

    Hello!

    I faced some problems while implementing my SortFilterProxyModel, based on QSortFilterProxyModel.
    This is for QML project, similar to this: "Qt Digia Blog | Qt Weekly #6: Sorting and filtering a TableView":http://blog.qt.digia.com/blog/2014/04/16/qt-weekly-6-sorting-and-filtering-a-tableview
    but I suppose this is not connected with widgets or qml part, just connected with QSortFilterProxyModel implementation.

    The problem is the model updating too frequently, ignoring what roles changing
    (just update every role, when some role changed)

    I guess this is connected with this bug: "QTBUG-35440":https://bugreports.qt-project.org/browse/QTBUG-35440
    As you can see in bug comments, method
    @void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int> ())@
    for QSortFilterProxyModel always returning empty roles vector.

    Also looks like Bruno Carbal faced similar problems: "his comment on Qt Digia Blog post":http://blog.qt.digia.com/blog/2014/04/16/qt-weekly-6-sorting-and-filtering-a-tableview/#comment-1193444

    Can somebody help me? For example, approve that I'm right and thinking the right way?

    Thank you for your time and help.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved