Hi,
Actually I want to create a temporary file like temp.txt.<random number>,
because temp.txt file is already exists in that directory.
then I want to assign that temporary file to QFile,
how can I do that ?
Thanks for your replies.
-npc
Hi,
Actually I want to create a temporary file like temp.txt.<random number>,
because temp.txt file is already exists in that directory.
then I want to assign that temporary file to QFile,
how can I do that ?
Thanks for your replies.
-npc
Why don't you use QTemporaryFile ? http://doc.trolltech.com/4.1/qtemporaryfile.html
Thaks for your reply,
Sorry I forgot to tell my Qt version, It is Qt 3.3 I cant find any classes like that.
-npc
I think you can use QUuid for this.
Mithin
www.mithin.in
Thanks munna,
Is there any other way to do this apart from using UUID ?
-
hmmm....
I was not able to find any other method using Qt 3. Some expert here might know a better way. Wait for their replies
Mithin
www.mithin.in
You can create a "pseudorandom" filename based on current time and process id and then create a file with that name.
Thank you wysota,
I used getpid() to get the process id, and used the same.
-
Bookmarks