the thing is that when i start my app from the command line it finds and opens the right files but when i click on the app icon in a window manager (gnome/kde), they don't. do i have to use QDir? thanx.
the thing is that when i start my app from the command line it finds and opens the right files but when i click on the app icon in a window manager (gnome/kde), they don't. do i have to use QDir? thanx.
You use relative paths. When you click the app icon in the file manager, the current directory is set to your home dir and your application can't find the files it needs. You should either change the current directory back in your app or (what is better) use absolute paths. QCoreApplication::applicationDirPath() may be helpful here.
i tried to set it with QCoreApplication::applicationDirPath() but i couldn't get it through main(); i finally solved it with QDir setPath in my class implementation :
if you could provide a snip for main() i'll give it a shot. thanx again
Qt Code:
To copy to clipboard, switch view to plain text mode
Bookmarks