Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Plugins in qt.conf is not working but QT_PLUGIN_PATH does

    Installation and Deployment
    2
    2
    9534
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      th.thielemann last edited by

      I use more than one Qt version on my dev. pc. Therefore I created qt.conf file in binary folder to point to my/used/qt.

      @[Paths]
      Libraries = /home/my/used/x86/qt/usr/local/qt/lib@
      Result: QML application with usage of fonts from .../lib/fonts is working as expected.

      I wrote another app using the sqldriver and therefore my qt.conf looks like:
      @[Paths]
      Libraries = /home/my/used/x86/qt/usr/local/qt/lib
      Plugins = /home/my/used/x86/qt/usr/local/qt/plugins@
      Result: Db Driver QSQLITE is not available.

      I set up the env variable:
      @export QT_PLUGIN_PATH=/home/my/used/x86/qt/usr/local/qt/plugins@
      Result: The SQL application works as expected.

      I tried to find an environment variable to set the path to the Qt libs and fonts. But I found no solution.

      My goal is to have only one way to configure the application environment. Either qt.conf or system variables.
      Any suggestions or hints?

      Regards,
      Thomas

      1 Reply Last reply Reply Quote 0
      • hskoglund
        hskoglund last edited by

        Hi, using qt.conf can in some cases fail, because it's slightly more brittle than exporting QT_PLUGIN_PATH (I've written about it "here":http://www.tripleboot.org/?p=536

        Just guessing, but if you are calling something like QStyleFactory::keys() first thing in main.cpp, that can be the explanation.

        EDIT: forgot, you can also trace the plugins loading in QtCreator, by exporting QT_DEBUG_PLUGINS=1 (or set it in QtCreator/Projects/Build Environment, that worked for me)

        1 Reply Last reply Reply Quote 1
        • First post
          Last post