Results 1 to 3 of 3

Thread: Changing location of plugins

  1. #1
    Join Date
    Jun 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Changing location of plugins

    I have created an database application that uses QODBC driver, and all worked on my computer.
    i deployed it on another computer, i get errors when running my application. I remark that Qt has kept the default path for accessing to plugins as C:/../../plugins, so i create this same path on client machine before my application works.
    Now i want to change the plugins's path to my directory of my project but i dont know how do it? i have read documentation and i fall on 'Using qt.conf' but i dont really understand.

    Thanks for advance.

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Changing location of plugins

    By default Qt will check the application directory as one of the paths that could contain plugins and other libraries.
    Just copy the 'sqldrivers' directory (from plugins) to directory where your binary is and everything should work.

    If you want to place it anywhere else, use addLibraryPath() but you will still have to preserve directory structure inside plugins (so the new path would be d:\mylibs\something\sqldrivers ).

  3. #3
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Changing location of plugins


Similar Threads

  1. QSlider: changing the groove without changing the handle
    By Olivier Berten in forum Qt Programming
    Replies: 3
    Last Post: 30th April 2013, 11:02
  2. Replies: 17
    Last Post: 2nd January 2011, 18:11
  3. Mac OS, plugins that user designer plugins
    By Royceybaby in forum Qt Programming
    Replies: 0
    Last Post: 9th May 2010, 02:40
  4. Replies: 2
    Last Post: 10th August 2009, 10:45
  5. Location of QGraphicItem!!
    By rachana in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2007, 22:20

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.