[Qt-interest] Strange problem with QFile

Malyushytsky, Alex alex at wai.com
Tue Jul 7 04:03:06 CEST 2009


I would like to add to the previous answer:
You currently working folder depends on the way you start application.
Your installer could specify different folder into shortcut (Start in field).

Regards

From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of ??
Sent: Monday, July 06, 2009 6:56 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Strange problem with QFile

You specify a relative path instead of a absolute path in QFile constructor.
So, the exact path is determined by your current working directory.

2009/7/7 Patric <userqt at gmail.com<mailto:userqt at gmail.com>>
Another thing I have noticed...
My installation creates a shortcut on my Desktop.

It seems that when I run the program from the shortcut, QFile makes the file on the Desktop. When I run it from the exe in the installation folder, it will make the file in that directory.

Any ideas how to avoid this ??

Best regards,
Patric
----- Original Message -----
From: Patric<mailto:userqt at gmail.com>
To: qt-interest at trolltech.com<mailto:qt-interest at trolltech.com>
Sent: Tuesday, July 07, 2009 4:35 AM
Subject: Strange problem with QFile

Hi,
I have strange problem here.

QFile devicesFile(devices.txt);

I use this to create a file. When I start my program from QT Creator, the file is saved in the workspace\Project\debug or release folder. So it's not a problem.

But when I made my installation package, this file is now saved on my desktop instead of my program installation directory.
Does anyone know where might be the reason for this ?

Regards,
Patric

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com<mailto:Qt-interest at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-interest



---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”

“Please consider our environment before printing this email.”
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090706/7e9996ae/attachment.html 


More information about the Qt-interest-old mailing list