dimanche 5 mars 2017

QDomElement::text() convert to int

I have a problem while i try to convert a QString into a int:

in my Qt program i have to read a number from a xml file, when i've got the correct QDomElement references i try to print the QString generated by QDomElement::text(); and that print the correctly number (for example '6'). But When i'll try to convert the QString into int using the QString::toInt() function it print strange simbols like '♤','²','½','þ', ecc..

How can it's possible??

The xml file haven't got hidden character and it is correct..

Aucun commentaire:

Enregistrer un commentaire