qt-interest@trolltech.com
[Top] [All Lists]

doubt on QDateTime of an executable program.

Subject: doubt on QDateTime of an executable program.
From: Lingfa Yang
Date: Fri, 22 Aug 2008 13:37:40 -0400
Hello,

I have a Qt application, when being executed, I wish to know how long it was modified or created.
What I did is:
QString program = QCoreApplication::applicationDirPath() + "/" + QFileInfo(argv[0]).fileName();
   QDateTime currentDateTime = QDateTime::currentDateTime();
   QDateTime lastModified = QFileInfo(program).lastModified ();
   QDateTime created = QFileInfo(program).created();
My doubt is when I copy the program from the original directory to a new directly, the date and time changed. Why?
(I'm in Windows XP, VS2005, Qt4.3)

Thanks in advance,
Lingfa

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>