Results 1 to 2 of 2

Thread: convert qreal to qstring

  1. #1
    Join Date
    Jan 2010
    Posts
    39
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default convert qreal to qstring

    hi all,

    how to convert qreal to qstring so that I can set it to qlabel.

  2. #2
    Join Date
    Sep 2009
    Posts
    72
    Thanked 10 Times in 10 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: convert qreal to qstring

    Hi,

    use
    Qt Code:
    1. QString QString::number ( double n, char format = 'g', int precision = 6 )
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. convert a doubole to qreal
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 1
    Last Post: 11th February 2009, 06:15
  2. qreal -> QString conversion
    By MarkoSan in forum Newbie
    Replies: 2
    Last Post: 13th April 2008, 14:37
  3. convert QString to int
    By mattia in forum Newbie
    Replies: 2
    Last Post: 4th January 2008, 09:10
  4. how to convert int to QString?
    By phillip_Qt in forum Newbie
    Replies: 2
    Last Post: 5th October 2007, 08:07
  5. How to convert Int to QString in QT4?
    By drake1983 in forum Newbie
    Replies: 2
    Last Post: 11th March 2007, 06:58

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.