Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.14.0 plugins path
Forum Updated to NodeBB v4.3 + New Features

Qt 5.14.0 plugins path

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 1.0k Views 1 Watching
  • 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.
  • G Offline
    G Offline
    Gertio
    wrote on last edited by
    #1

    Hi, I have recently updated from 5.12.6 to 5.14.0 (using msvc2017 kits). In the older version I was able to run Gui programs (developed in Visual Studio 2019) without the need of copying the plugins dll's (like qwindows.dll) to the bin folder (where the .exe of the Gui program is). It did find the dll's in the Qt install path, e.g. C:\Qt\5.14.0\msvc2017_64\plugins\platforms.
    After the Update it is not the case anymore and I have to copy the plugins. Actually it is not a big deal, but I was just wandering why it is different now, I have checked system variables and registry (with the 5.12.6 version) but could not find anything that points to the plugins folder. So I am just curious now why it does not find the files after the update although nothing in system variables and registry has changed.

    1 Reply Last reply
    0
    • hskoglundH Online
      hskoglundH Online
      hskoglund
      wrote on last edited by
      #4

      Actually Qt's loading of plugins does not pay attention to the system PATH, it uses other means of obtaining the directory of qwindows.dll etc.

      Before 5.14.0 the most frequent method was to read the directory hardwired into Qt5Core.dll at install time (grep for qt_prfxpath, that's how your Qt version 5.12.6 could find the plugins it needed).

      But in 5.14.0 Qt got rid of that qt_prfxpath hardwired into Qt5Core.dll, it caused more problems than it solved. For example, windeployqt patched that path to "." More here https://bugreports.qt.io/browse/QTBUG-14150

      There are lots of other alternatives to inform Qt where your plugins are, for example you can place a qt.conf file next to your .exe file, that looks like this:

      [Paths]
      Plugins=C:/Qt/5.14.0/msvc2017_64/plugins
      

      (Be sure to use forward slashes, backward slashes do not work)

      1 Reply Last reply
      2
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @Gertio said:

        I was able to run Gui programs (...) without the need of copying the plugins dll's

        That doesn't happen on its own and Qt installer doesn't set it up this way as far as I know.
        This would happen if you have your plugin directory added to the system PATH. If your new installation dir is different (e.g. has the version number in it) this would also explain why it stopped working - you still have the old dir in your PATH.

        Check your PATH. Btw. if Qt is there this is a pretty bad setup and I would discourage this. It can mess up things if you have two versions of Qt installed side by side or some Qt based app picks this up accidentally. Keep your libraries local, that's a lot safer.

        1 Reply Last reply
        1
        • G Offline
          G Offline
          Gertio
          wrote on last edited by
          #3

          Thats the thing I dont get, I have checked the environment variables (which also includes PATH variable) and I have also checked the registry, but I have not found anything regarding the plugin directory.
          If PATH would contain the dir, it would explain it, just as you say. But it does not, and thats what I dont get.

          1 Reply Last reply
          0
          • hskoglundH Online
            hskoglundH Online
            hskoglund
            wrote on last edited by
            #4

            Actually Qt's loading of plugins does not pay attention to the system PATH, it uses other means of obtaining the directory of qwindows.dll etc.

            Before 5.14.0 the most frequent method was to read the directory hardwired into Qt5Core.dll at install time (grep for qt_prfxpath, that's how your Qt version 5.12.6 could find the plugins it needed).

            But in 5.14.0 Qt got rid of that qt_prfxpath hardwired into Qt5Core.dll, it caused more problems than it solved. For example, windeployqt patched that path to "." More here https://bugreports.qt.io/browse/QTBUG-14150

            There are lots of other alternatives to inform Qt where your plugins are, for example you can place a qt.conf file next to your .exe file, that looks like this:

            [Paths]
            Plugins=C:/Qt/5.14.0/msvc2017_64/plugins
            

            (Be sure to use forward slashes, backward slashes do not work)

            1 Reply Last reply
            2

            • Login

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