[Solved]QDomElement QString without quotation marks



  • Hi
    I used QDomDocument to find an attribute in a xml file.
    I want to convert it to a double, but the attribute function returns the QString with quotation marks.
    So i can´t convert the QString to a double.
    I have to remove the first and the last element per "hand"? Or is there another method?
    thx

    EDIT:
    I have solved the problem.
    The quotation marks be not part of the string, there are only shown bei QDebug().
    And i ave used toDouble wrong:
    @
    string stringTmp;
    double doubleTmp = QString::toDouble(stringTmp);
    @

    but it had to be:
    @
    double doubleTmp = stringTmp.toDouble();
    @



  • Hi starFire, since this is solved. Please add "[Solved]" to the thread title so It can help other users :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.