Results 1 to 3 of 3

Thread: Opening text file fails after autostartup on windows

  1. #1
    Join Date
    Oct 2008
    Location
    Montreal, Canada
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Opening text file fails after autostartup on windows

    Hi,

    I created an application that reads and stores data form/in text files.
    I created an installer for windows that adds a key in windows registry (HKLM ... Run).
    If I lunch the application from the exe file it works fine. but when the application is loaded on windows startup it can't read and write from/to the text files.
    So to make a test I downloaded google maps example from : http://labs.trolltech.com/blogs/2008...h-google-maps/ that reads adresses from a text file and I builded the app on windows and I added to windows registry to run on startup. Result same thing it cannot read from text file when its loaded on windows startup.

    Any one has any clue how to fix this ????

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Opening text file fails after autostartup on windows

    Are your environment variables properly set ??
    and also what paths are u using in the application ? are they relative to the path of the application directory ?

  3. #3
    Join Date
    Oct 2008
    Location
    Montreal, Canada
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Opening text file fails after autostartup on windows

    Thanks for your help, I fixed the problem by using QT function : QCoreApplication::applicationDirPath(). Before that I was using relative path

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49

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.