Results 1 to 12 of 12

Thread: QDateTime problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2008
    Posts
    17
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDateTime problem

    sorry but I did not understand what you mean , can you write example

    thanks

  2. #2
    Join Date
    Nov 2008
    Posts
    17
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDateTime problem

    I don't think so, because I bring the date from the file system

    QDateTime QFileInfo::lastModified () const

    so the return value will be type QDateTime
    and also i used MyFile object to access other data such as file name and size , its output right data , which means the file object is point to file in right way ... so lastModified should return value of type QDateTime and I need to covert it to string ... but whatever i try its output nothing !

  3. #3
    Join Date
    Jan 2006
    Posts
    132
    Thanked 16 Times in 16 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDateTime problem

    Think is good, but check is better. What does this write:

    Qt Code:
    1. qDebug() <<MyFile.lastModified().isValid();
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Nov 2008
    Posts
    17
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDateTime problem

    its output false !!!

    but way !?

    Qt Code:
    1. qDebug() <<MyFile.fileName()
    2. qDebug() <<MyFile.lastModified().isValid();
    To copy to clipboard, switch view to plain text mode 

    since its return the file name , why its dont return the last modified date !!! ?

  5. #5
    Join Date
    Jan 2006
    Posts
    132
    Thanked 16 Times in 16 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDateTime problem

    What about:

    Qt Code:
    1. qDebug() <<MyFile.exists();
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    Nov 2008
    Posts
    17
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDateTime problem

    return false

  7. #7
    Join Date
    Jan 2006
    Posts
    132
    Thanked 16 Times in 16 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDateTime problem

    Case solved, right?

  8. #8
    Join Date
    Nov 2008
    Posts
    17
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDateTime problem

    yes sir, sorry for disturbance


Similar Threads

  1. deployment problem: msvc++ 2008 Express, Qt 4.4.3
    By vonCZ in forum Qt Programming
    Replies: 7
    Last Post: 10th November 2008, 14:38
  2. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  3. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  4. Problem with comparing two QDateTime objects
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 15th May 2008, 11:27
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.