Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Plugins in qt.conf is not working but QT_PLUGIN_PATH does

Plugins in qt.conf is not working but QT_PLUGIN_PATH does

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 10.1k Views
  • 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 Offline
    T Offline
    th.thielemann
    wrote on last edited by
    #1

    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
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      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
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved