Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved]QDomElement QString without quotation marks

[Solved]QDomElement QString without quotation marks

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    starFire
    wrote on last edited by
    #1

    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();
    @

    1 Reply Last reply
    0
    • B Offline
      B Offline
      BlastDV
      wrote on last edited by
      #2

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

      (8) Just live your life blind like me (8)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved