Results 1 to 10 of 10

Thread: Cannot convert double to QString

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Posts
    60
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    9
    Thanked 3 Times in 3 Posts

    Default Re: Cannot convert double to QString

    That gives: 42.840000

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Cannot convert double to QString

    Did you compile Qt yourself or do you use some precompiled package? What exact architecture do you have? x86?

  3. #3
    Join Date
    Oct 2006
    Posts
    60
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    9
    Thanked 3 Times in 3 Posts

    Default Re: Cannot convert double to QString

    Yes it is x86 and I did compile Qt myself as I could only find Qt 3 for FreeBSD 4.8 in package format.

    Thanks
    mAx

  4. #4
    Join Date
    Dec 2007
    Posts
    4

    Default Re: Cannot convert double to QString

    Some ARM installations have floating point implementations that are not fully IEEE-compliant. In Qt/Embedded 3.3.x, this causes QString::number(double) and related functions to give incorrect results. A fix for this was introduced in Qt 3.3.2: defining the macro QT_QLOCALE_USES_FCVT will make Qt use system library code instead, i.e:

    ./configure -embedded arm -DQT_QLOCALE_USES_FCVT ...

    i am in the face of this problem,i have added the macro,but it doesn't work.

Similar Threads

  1. How to convert from QString to string ?
    By probine in forum Newbie
    Replies: 2
    Last Post: 1st December 2010, 01:50
  2. Convert wstring to QString.
    By bunjee in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2007, 14:18
  3. Replies: 2
    Last Post: 12th June 2006, 17:47
  4. How to convert from QString to quint16 ?
    By probine in forum Qt Programming
    Replies: 5
    Last Post: 31st March 2006, 09:00
  5. [SOLVED] Widget plugin ... how to ?
    By yellowmat in forum Newbie
    Replies: 10
    Last Post: 29th January 2006, 20:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.