Results 1 to 2 of 2

Thread: qSortFilterProxyModel examples

  1. #1
    Join Date
    Jan 2011
    Location
    Richmond, VA
    Posts
    94
    Thanks
    14
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default qSortFilterProxyModel examples

    Afternoon --

    Thanks to some great suggestions I'm converting an app I've written with a standard master-detail architecture over to one that uses QSortProxyModel (mine is based on an record retrieved from the master view and using setfilter() on the detail); while I can add data the way I need to I can't seem to copy data in the details model like I need to...I need to find detail records assigned to one master, create a new master, and point the newly copied detail records to the the new one...This is because of the way setfilter() works

    Basically -- unless I switch my DB setup to be denormalized -- I have one Tableview containing my master data and another Tableview containing my detail data (both QSqlTableModels). I've spent a few hours going round and round trying to implement this via a QSortProxyModel, but I've been applying it to my detail model but I think that's wrong, so can anyone point me to an example to follow? I found this link: http://www.qtcentre.org/threads/2781...-mapToSource()

    Should I be following this?

    Thanks in advance!


    scott

  2. #2
    Join Date
    Jan 2011
    Location
    Richmond, VA
    Posts
    94
    Thanks
    14
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: qSortFilterProxyModel examples

    Nevermind -- got it working...

    scott

Similar Threads

  1. Problems with QSortFilterProxyModel
    By Nefastious in forum Newbie
    Replies: 10
    Last Post: 31st October 2009, 19:51
  2. Using QSortFilterProxyModel
    By Jennie Bystrom in forum Qt Programming
    Replies: 3
    Last Post: 6th December 2007, 11:28
  3. QSortFilterProxyModel - filterKeyColumn
    By SirBabyface in forum Qt Programming
    Replies: 1
    Last Post: 7th September 2007, 17:09
  4. QSortFilterProxyModel
    By evgenM in forum Qt Programming
    Replies: 1
    Last Post: 18th March 2007, 12:53
  5. QSortFilterProxyModel problem
    By blukske in forum Qt Programming
    Replies: 8
    Last Post: 22nd June 2006, 09:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.