Results 1 to 5 of 5

Thread: [SOLVED][PyQt4] QSortFilterProxyModel modify QStandardItemModel and QTreeView ??

Threaded View

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

    Default Re: [PyQt4] QSortFilterProxyModel modify QStandardItemModel and QTreeView ??

    Ok I missed the QStandardItemModel thing, any way you will need to map the index from the poxy model to the source model.

    Qt Code:
    1. b = mapToSource(a);
    2. myitem = a.model().sourceModel().itemfromIndex(b);
    To copy to clipboard, switch view to plain text mode 

    Edit: I mean change this to PyQt equivalent
    Last edited by Santosh Reddy; 19th April 2013 at 13:46.
    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. The following user says thank you to Santosh Reddy for this useful post:

    grall (19th April 2013)

Similar Threads

  1. QTreeView with QStandardItemModel
    By aekilic in forum Qt Programming
    Replies: 0
    Last Post: 16th February 2011, 10:11
  2. Replies: 12
    Last Post: 5th July 2009, 17:03
  3. QTreeView with QStandardItemModel
    By steg90 in forum Newbie
    Replies: 3
    Last Post: 16th May 2007, 10:28
  4. Modify model data in QTreeView
    By YuriyRusinov in forum Qt Programming
    Replies: 6
    Last Post: 26th October 2006, 18:28
  5. can't do a QTreeView with a QStandardItemModel
    By Nuria in forum Qt Programming
    Replies: 4
    Last Post: 27th July 2006, 01:41

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.