Results 1 to 2 of 2

Thread: Highlighting substring problem

  1. #1
    Join Date
    Mar 2010
    Posts
    69
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Highlighting substring problem

    Hello Everyone,
    I am now in a middle of a project, where I am developing a use interface. I have a QAbstractListModel and I am adding that model into QTreeView. In my User Interface I have some filter buttons which will generally compress the list of items according to name of the user. I am using QSortFilterProxyModel and QRegExp for that. Everything is working fine but now I want to be more specific , like I want to highlight the substring that will be matched with the regular expression that is generated by pressing my filter window. I know where it is matching and I have the substring. So how can I achieve it? I want use different fornt and color mor matched portion and the portion that doesn't match with regular expression.

    Thanks in advance.

  2. #2
    Join Date
    Mar 2010
    Posts
    69
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Highlighting substring problem

    I am sorry in my previous question there are some mistakes. I have corrected them in this.


    Hello Everyone,
    I am now in a middle of a project, where I am developing a user interface. I have a QAbstractListModel and I am adding that model into QTreeView. In my User Interface I have some filter buttons which will generally compress the list of items according to name of the patient from a list of patient. I am using QSortFilterProxyModel and QRegExp for that. Everything is working fine but now I want to be more specific , like I want to highlight the substring that will be matched with the regular expression that is generated by pressing my filter buttons. I know where it is matching and I have the substring. So how can I achieve it? I want to use different fornt and color for matched portion and the portion that doesn't match with regular expression.

    Thanks in advance.

Similar Threads

  1. QwtSymbol highlighting?
    By shud in forum Qwt
    Replies: 1
    Last Post: 2nd October 2009, 21:42
  2. highlighting a QPushButton
    By qtUser500 in forum Qt Programming
    Replies: 6
    Last Post: 14th July 2009, 20:21
  3. Highlighting QTreeWidgetItem
    By rajesh210 in forum Qt Programming
    Replies: 1
    Last Post: 23rd July 2008, 11:51
  4. How to check if a string starts with a substring?
    By lni in forum Qt Programming
    Replies: 3
    Last Post: 18th April 2007, 00:36
  5. Replies: 2
    Last Post: 10th February 2006, 12:57

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.