I am trying to create a QStringList
containing all punctuation signs.
How can I add the element "
into it ?
I am trying to create a QStringList
containing all punctuation signs.
How can I add the element "
into it ?
You can use \
to escape the character "
. The code may look like this:
QStringList foo;
foo << "\"";
An other option would be to construct a QString
from a char declared between simple quotes '
:
foo << QString('"');
Since the constructor isn't declared as explicit
in documentation, this should also work with implicit conversion:
foo << '"';