PDA

View Full Version : running a program from the shell is not the same as running it by double clicking



probine
16th May 2006, 23:04
I created a simple program. This program is a widget that contains a QPushButton. This button has an image on it.

When I run the program from the shell, then the image is displayed perfectly, but when I double click on the program's icon to run it, then the image is not displayed.

Why ?
How do I solve this problem ?

jacek
17th May 2006, 00:23
Don't use paths relative to the current working directory. QCoreApplication::applicationDirPath() might help you.