Results 1 to 7 of 7

Thread: Linking pb file to the Qt program.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Linking pb file to the Qt program.

    Quote Originally Posted by comvis View Post
    The third code only works when I ran my program inside my machine and I understand that since it is the absolute directory of my pb file.
    Yes, correct.

    And the first two are relative paths, the program will look for these in the current working directory.
    The current working directory is very often not the program's installation location.

    As ChristianErlicher wrote, you can create a path relative to the executable.

    Quote Originally Posted by comvis View Post
    Even adding the pb file to the resource didn't solve.
    Well, not if you pass the resource path to a non-Qt library, it won't understand this type of path.
    For this kind of usage the resource data needs to be first extracted into a real file, e.g. using QTemporaryFile::createNativeFile().

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    comvis (3rd August 2019)

Similar Threads

  1. Replies: 4
    Last Post: 26th September 2017, 07:49
  2. Replies: 5
    Last Post: 11th December 2010, 13:49
  3. linking a google protobuf file and a QT file
    By pratikag in forum Newbie
    Replies: 2
    Last Post: 29th June 2010, 18:52
  4. Linking with dbf file
    By prasenjit in forum Qt Programming
    Replies: 3
    Last Post: 13th January 2010, 12:21
  5. Program not linking with static image plugins
    By andyp in forum Qt Programming
    Replies: 7
    Last Post: 8th December 2009, 10:15

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.