Results 1 to 3 of 3

Thread: QRegeXp - searching a pattern given in QLineEdit

  1. #1
    Join Date
    Jun 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QRegeXp - searching a pattern given in QLineEdit

    I've got some points in some sets and i want to search for specified point in each set by entering pattern in QLineEdit (like 2,3 to search point (2,3) etc.). I think regexp would be the best for it, but i totally don't know how to do that.

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QRegeXp - searching a pattern given in QLineEdit

    1. read documentation QRegExp and QTextDocument::find.
    2. if its not enough give better description of problem (examples, also negative).

  3. #3
    Join Date
    Jun 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QRegeXp - searching a pattern given in QLineEdit

    I've got a class Set and i create objects set1,set2,etc... I add to this objects points (x,y),for example set1: (1,2), (0,0), (-8,65) and i want to find specified point (i put wanted pattern into QLineEdit). For example I want to search for point (0,0), so i write this points into QLineEdit. If i put (1,*) it will search for all points with first coordinate = 1.
    I was trying to do linear search, but i don't know how to do (1,*) (*,*) etc...

Similar Threads

  1. Replies: 1
    Last Post: 12th October 2010, 22:20
  2. Searching a QListWidget
    By bl1nk in forum Newbie
    Replies: 11
    Last Post: 9th August 2010, 21:54
  3. Searching in a list.
    By kaushal_gaurav in forum Qt Programming
    Replies: 4
    Last Post: 15th October 2008, 08:00
  4. Searching a QTable
    By nategoofs in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2007, 22:15
  5. Searching in QListView
    By ct in forum Qt Programming
    Replies: 20
    Last Post: 28th July 2007, 14:40

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.