Results 1 to 6 of 6

Thread: Proxy for TreeView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Proxy for TreeView

    You are not taking the "parent" index into consideration when mapping indexes. I don't know what your proxy is supposed to do, so I can't suggest a solution.

  2. #2
    Join Date
    Feb 2008
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Proxy for TreeView

    Hi wysota,

    in the first step I just wanna get my model into the proxy. Later I want to use the proxy to adapt the model. I tried to get the parent in the transformation but didn't succeeded. In the model the Item is used to get the parent, but as far as I understand the proxy concept it is not the right way to work over the items and I don't know how to get the parent over the index in this approach.

    thanks,
    Patrik

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Proxy for TreeView

    Maybe you should start with QSortFilterProxyModel instead of the abstract one?

  4. #4
    Join Date
    Feb 2008
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Proxy for TreeView

    Hi wysota,

    I made some tests with the QSortFilterProxy but that doesn't fit for the things I want to make

    Cheers

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Proxy for TreeView

    And what do you want to make? Looking at your code I see you are trying to do 1-1 mapping and that's exactly what the sort filter proxy does out of the box.

Similar Threads

  1. Custom proxy model issue
    By Khal Drogo in forum Qt Programming
    Replies: 13
    Last Post: 30th November 2007, 12:41
  2. QT Network Proxy Configuration
    By suresh in forum Qt Programming
    Replies: 7
    Last Post: 28th September 2007, 01:16
  3. QTcpSocket - Proxy problem
    By vishesh in forum Qt Programming
    Replies: 1
    Last Post: 26th September 2007, 23:48
  4. Model and Proxy
    By larry104 in forum Qt Programming
    Replies: 1
    Last Post: 4th August 2006, 21:05
  5. setIndexWidget and proxy interaction
    By Derf in forum Qt Programming
    Replies: 3
    Last Post: 25th March 2006, 18:15

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.