Results 1 to 3 of 3

Thread: Define a QRegExp using angular brackets <>

  1. #1
    Join Date
    Nov 2013
    Location
    Chandigarh, India
    Posts
    62
    Thanks
    8
    Thanked 11 Times in 7 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Define a QRegExp using angular brackets <>

    I want to define a regular expression containing angular brackets <> such that whatever I write in these brackets gets some pattern.. e.g QRegExp rx; rx.setForeground("orange");.. Can anyone help me with how to define such a regular expression?

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Define a QRegExp using angular brackets <>

    define a regular expression containing angular brackets <> such that whatever I write in these brackets gets some pattern
    Can you give some examples ?
    QRegExp rx; rx.setForeground("orange");
    I failed to find "setForeground" method in QRegExp class What does it mean for regular expression to have an orange foreground ?

  3. #3
    Join Date
    Nov 2013
    Location
    Chandigarh, India
    Posts
    62
    Thanks
    8
    Thanked 11 Times in 7 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Define a QRegExp using angular brackets <>

    I was able to implement the angular brackets as QRegExp("<.*>");.. sorry i incorrectly mentioned about foreground, i have used it as rx.setForeground(QColor("orange"));.... It worked.. Thank You very much...

Similar Threads

  1. Define a QRegExp
    By aaditya190 in forum Newbie
    Replies: 8
    Last Post: 2nd December 2013, 06:29
  2. Replies: 2
    Last Post: 26th November 2013, 05:15
  3. Higliting matching brackets in QPlainTextEdit
    By Nebelig in forum Qt Programming
    Replies: 2
    Last Post: 2nd May 2013, 01:17
  4. Replies: 1
    Last Post: 4th May 2011, 08:49
  5. Algorithms problem of brackets including.
    By luffy27 in forum General Programming
    Replies: 2
    Last Post: 12th April 2007, 01:10

Tags for this Thread

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.