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. Clashing paths of Qt resources in multiple shared libraries
QtWS25 Last Chance

Clashing paths of Qt resources in multiple shared libraries

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.4k 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.
  • Chris KawaC Offline
    Chris KawaC Offline
    Chris Kawa
    Lifetime Qt Champion
    wrote on last edited by
    #1

    Hi,

    I've got this project that loads plugins from shared libraries.
    All of the plugins and the main app are based on a common framework that holds a configuration file (version info etc.) in a .qrc resource. This configuration file has a path like ":/res/config.ini"

    On app load and on each plugin load they're suppose to read their configuration from those files.
    Main app loads correct configuration, but plugins seem to catch the main app file instead of their own copy.

    I assume the resources are loaded to a "common space" and there's path clashing.
    I know it's desirable in general but in my case this is a problem.
    Is there a way to separate Qt resources so that dynamically loaded shared library "sees" only it's own resources and not the common pool?
    Prefixing etc. is not an option because as I said - they're based on a common framework and the paths are fixed.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It would need some sort of namespacing but I don't think it's available for qrc

      I wonder if this might be seen like a bug or a feature request.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

        I ended up switching to windows .rc files for some of the resources (it's a Windows only project).
        Fortunately "LoadResource":http://msdn.microsoft.com/en-us/library/windows/desktop/ms648046.aspx lets me specify a module to look in.
        It's less than ideal to have two different resourcing systems and I like qrc better, but with some wrapping around I managed to get similar interface for my needs.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I agree, a pure qrc solution would be better.

          Did you look at the bug tracker to see if there was something related to this ? Otherwise It could be a new feature of qrc

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

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