Results 1 to 2 of 2

Thread: Source Model Ad Proxy Model

  1. #1
    Join Date
    Jan 2011
    Qt products
    Qt4 Qt/Embedded
    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


  2. #2
    Join Date
    Mar 2011
    Hyderabad, India
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    MacOS X Unix/X11 Windows
    Wiki edits

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


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.