[Qt-interest] QString is changing when the first character is any special character.

Asheq Hamid asheq at ankur.org.bd
Tue Feb 23 08:54:07 CET 2010


Hello all,

Thanks to Stephen for the help. This helps to get the actual data from a
Qstring. But this does not solve my problem on QSyntaxHighlighter. :(

QSyntaxHighlighter class is receiving the associated texteditbox's text as a
parameter of highlightblock function. As it receives the text, it is already
modified. So I can't get the old actual value anymore. How can I get the
actual value from HighlightBlock function's parameter?

For example, I wrote the string "%(devicename)s está sincronizado
actualmente con %(synclist)s." in the texteditbox. Qt automatically sends it
to associated syntaxhighlighter class's highlightblock method as a
parameter. As I print text inside highlightBlock function, I get
"%(devicename)s está sincronizado actualmente con %(synclist)s."  The
character á is already changed to á

How can I get the actual value from HighlightBlock function's parameter?

Thanking all,
-Asheq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100223/ae7a2fab/attachment.html 


More information about the Qt-interest-old mailing list