Results 1 to 3 of 3

Thread: QTime error?

  1. #1
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTime error?

    Hello! I'm trying to use QTime to convert some milliseconds values to the formatted time string representation. But I failed with that. Here is the simple example that gives me an empty string:

    Qt Code:
    1. t.addMSecs (1000);
    2. qDebug() << t.toString();
    To copy to clipboard, switch view to plain text mode 

    P.S. I have Qt 4.6.2 on Linux 32 bit.

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

    Default Re: QTime error?

    QTime::addMSecs() returns a copy of the time object with miliseconds added. The original object is not modified.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    roxton (19th October 2010)

  4. #3
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTime error?

    Thanks! You saved me from the madness!!!

Similar Threads

  1. QTime
    By dragon in forum Newbie
    Replies: 12
    Last Post: 16th February 2012, 10:40
  2. QTime
    By bismitapadhy in forum Qt Programming
    Replies: 1
    Last Post: 26th June 2009, 05:21
  3. QTime restart
    By jhowland in forum Qt Programming
    Replies: 1
    Last Post: 8th October 2008, 20:18
  4. QTime private member mds means what?
    By jamadagni in forum Qt Programming
    Replies: 2
    Last Post: 24th March 2006, 18:08
  5. Extending QDate, QTime and QDateTime
    By jamadagni in forum Qt Programming
    Replies: 8
    Last Post: 24th March 2006, 15:51

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.