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. Unable to import a custom library (widget) to my Qt Project

Unable to import a custom library (widget) to my Qt Project

Scheduled Pinned Locked Moved General and Desktop
library
4 Posts 2 Posters 1.7k Views 2 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.
  • E Offline
    E Offline
    edumm
    wrote on last edited by
    #1

    Hi.

    This is my first post in this forum as I am starting to develop using Qt.

    I would like to post my problem which I have not able to solve. I downloaded two libraries:

    http://www.ics.com/blog/integrating-custom-widget-qt-designer

    http://qt-apps.org/content/show.php/QLedIndicator?content=118610

    I have only been able to import this projects by copying the source code into my project and use it as a promoted QWidget. I would like to import the libraries in order to avoid an annoying workspace in Qt. My problems are:

    1. I cannot copy it in Qt creator.app/Contents/Plugin/Designer because when I open the Designer it crashes.
    2. If I copy the .dylib generated by Qt Creator with one of the codes previously linked in Qt/5.4/clang_64/plugins/designer nothing happens.
    3. If I try to import an external library I cannot use it.

    I would like to use it in the UI designer without using the promote command.

    I am working on a Mac and the Qt version is:

    Qt Creator 3.4.1 (opensource)
    Based on Qt 5.4.2 (Clang 6.0 (Apple), 64 bit)

    Thank's a lot and if further information is necessary, just tell me.

    Edu.

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

      Hi and welcome to devnet,

      Did you compile your plugin with the same version of Qt used to build Qt Creator ?

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

      E 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Did you compile your plugin with the same version of Qt used to build Qt Creator ?

        E Offline
        E Offline
        edumm
        wrote on last edited by
        #3

        @SGaist Hi! Thank's for your quick answer.

        Let's see, I think so but in order to check it:

        Qt Creator 3.4.1 (opensource)
        Based on Qt 5.4.2 (Clang 6.0 (Apple), 64 bit)
        This is what I get in "About to Qt Creator"

        Desktop Qt 5.4.2 clang 64 bit using Clang (x86 64 bit) compiler.

        I think they are the same but I might be wrong.

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

          Just thought of something, you are probably loading two different sets of Qt libraries. Qt Creator loads it's own copy and your plugin loads the one used to build it. So you would need to use otool to update the paths of your plugins.

          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