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. Q_DECLARE_METATYPE can not be used in a dynamic load/unload plugin
Qt 6.11 is out! See what's new in the release blog

Q_DECLARE_METATYPE can not be used in a dynamic load/unload plugin

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.5k 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.
  • L Offline
    L Offline
    lygstate
    wrote on last edited by
    #1

    When I use Q_DECLARE_METATYPE in a plugin, and that plugin will be load/unload at the runtime.
    When I calling the function at second time load and execute period, the program crashed. How to deal with such a problem? Is this a bug or just a wrong usage.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lygstate
      wrote on last edited by
      #2

      "This is the same question with no answer, Qt 5 didn't support for qUnregisterMetaType anymore":http://stackoverflow.com/questions/19234703/using-q-declare-metatype-with-a-dll-that-may-be-loaded-multiple-times

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

        Hi,

        Can you reproduce the crash with a minimal compilable example ? If so, I would suggest to post this question on the interest mailing list. You can also look at the "bug report system":http://bugreports.qt-project.org to see if there something about it

        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