Results 1 to 6 of 6

Thread: QSortFilterProxyModel and accissing data

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QSortFilterProxyModel and accissing data

    model=sourceModel() <-- this is not working
    What dou mean not working? are you sure the source model is set before that?
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  2. #2
    Join Date
    Apr 2013
    Posts
    4
    Qt products

    Default Re: QSortFilterProxyModel and accissing data

    I'm sure because everything is working, my delegate, my tableview, my model even filtering is working as I expect.

    The only exception is that I cannot populate the combobox with the data because I cannot access the data in the main body of sortfilterproxymodel class.

  3. #3
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QSortFilterProxyModel and accissing data

    Do you want to access filterted data, or the un-filtered data?

    In most cases sourceModel is not required to be used, unless custom filterring is being employed?

    I think it's time to see what you are doing to populate the combo box? Show us the code to populate the combo box.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. QSortFilterProxyModel and get correct data
    By Benecore in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2013, 13:48
  2. Replies: 1
    Last Post: 14th June 2011, 15:50
  3. Replies: 9
    Last Post: 11th April 2011, 10:05
  4. Sort huge data use QSortFilterProxyModel
    By jiaorenjie in forum Qt Programming
    Replies: 0
    Last Post: 16th March 2011, 02:56
  5. QSortFilterProxyModel with changing data
    By kemp in forum Qt Programming
    Replies: 4
    Last Post: 13th September 2010, 07:27

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
  •  
Qt is a trademark of The Qt Company.