Results 1 to 2 of 2

Thread: Source Model Ad Proxy Model

  1. #1
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Source Model Ad Proxy Model

    Hello forum,

    I have subclassed the QAbstractItemModel to create a tree model and assigned it to the tree view to show the data in tree hierarchy. Now i want to highlight a tree item based on the input of the line edit.

    Even if the child item is not expanded, it will be highlighted if the line edit expression is matched. I have the following questions.

    1 I have instantiated the proxyModel and set to the source model.

    2. The Tree view set the proxymodel instead the main model, Is that ok?


    I do not want to alter any item in the tree view except the fact that the matched item will be highlighted. But i am having the item to be filtered as well(only the matched item is shown in the tree view and the rest are removed from the view), which i do not want. I want to highlight the matched item.


    Looking forward to some hints on this issue

    Thanks
    Sajjad

  2. #2
    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

Similar Threads

  1. Custom Model and Proxy Model
    By frank100 in forum Qt Programming
    Replies: 1
    Last Post: 20th December 2010, 14:30
  2. Replies: 0
    Last Post: 16th November 2010, 09:55
  3. A Totalling Proxy Model?
    By ChrisW67 in forum Qt Programming
    Replies: 2
    Last Post: 7th April 2010, 03:06
  4. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 08:50
  5. Model and Proxy
    By larry104 in forum Qt Programming
    Replies: 1
    Last Post: 4th August 2006, 21:05

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.