Results 1 to 2 of 2

Thread: running a program from the shell is not the same as running it by double clicking

  1. #1
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default running a program from the shell is not the same as running it by double clicking

    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 ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: running a program from the shell is not the same as running it by double clicking

    Don't use paths relative to the current working directory. QCoreApplication::applicationDirPath() might help you.

Similar Threads

  1. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19

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.