Results 1 to 3 of 3

Thread: Quotes matching

  1. #1
    Join Date
    Nov 2013
    Posts
    46
    Thanks
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Quotes matching

    I am able to match paraenthesis using key release and key press concept but i am not able to match double quotes and single quotes. Any help would be appreciable!!!.For Paraenthesis matching, I compare parenthesis by pressing key that contains text {.
    if((key->text().contains(”{”)))

    but for Double and single Quotes using this kind of condition is not appropriate.
    if((key->text().contains(""")))
    This shows an error.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Quotes matching

    Yes it does for a double quote. A single-quote should be just fine inside double-quotes though.

    You need to learn some basic C programming.
    C Syntax: Strings and C Syntax: Character Constants

  3. #3
    Join Date
    Nov 2013
    Posts
    46
    Thanks
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Quotes matching

    yeah..its working fine now with escape sequence (\").

Similar Threads

  1. Replies: 4
    Last Post: 30th August 2020, 19:44
  2. Replies: 3
    Last Post: 17th April 2012, 16:05
  3. QSqlQuery escaping single quotes
    By pdoria in forum Qt Programming
    Replies: 0
    Last Post: 1st April 2012, 21:37
  4. qmake LIBS missing quotes
    By redoctober0 in forum General Programming
    Replies: 1
    Last Post: 12th January 2011, 16:05
  5. QSqlQuery and single quotes using bindValue
    By Luc4 in forum Qt Programming
    Replies: 4
    Last Post: 26th September 2010, 23:34

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.