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. QAbstractProxyModel subclassing and row selection
Qt 6.11 is out! See what's new in the release blog

QAbstractProxyModel subclassing and row selection

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 857 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.
  • E Offline
    E Offline
    edgreen
    wrote on last edited by
    #1

    Hi,

    I have created a QAbstractProxyModel subclass in order to perform multiple column sorting.

    Row selection is not behaving correctly; once the table is sorted, selection is not mapped correctly, and appears to be based on the source model.

    I had assumed that the mapSelectionFromSource/mapSelectionToSource methods would be used to resolve this, but they never get called. The documentation is a bit thin here; and perusing the source of QSortFilterProxyModel has not yielded any clues.

    I am a bit stumped as to where to go next; any insight into this would be much appreciated.

    I have created a trivial example project if anyone would be so kind as to take a look.

    Kind regards

    Ed.

    "Project Zip File...":https://drive.google.com/file/d/0B7ndWs6zmBPwb1dYcGExX2FmQTg/edit?usp=sharing

    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