Results 1 to 20 of 22

Thread: Number formats 00.00

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 25 Times in 24 Posts

    Default Re: Number formats 00.00

    if you want only 4 digit then
    QString msg = QString("%1").arg(number);
    msg = msg.leftJustified(msg.indexOf('.')+3, '0');
    msg = msg.left(msg.indexOf('.')+3);

    msg = msg.rightJustified(5,'0');
    Last edited by rajesh; 4th October 2007 at 12:53. Reason: code added

Similar Threads

  1. Line Number - QTextEdit...???
    By deepusrp in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2007, 16:34
  2. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13

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.