PDA

View Full Version : Quotes matching



parulkalra14
11th March 2014, 07:20
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.

ChrisW67
11th March 2014, 08:07
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 (http://www.wikipedia.org/wiki/C_syntax#Strings) and C Syntax: Character Constants (http://www.wikipedia.org/wiki/C_syntax#Character_constants)

parulkalra14
12th March 2014, 07:18
yeah..its working fine now with escape sequence (\").