Unable to import a custom library (widget) to my Qt Project
-
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:
- I cannot copy it in Qt creator.app/Contents/Plugin/Designer because when I open the Designer it crashes.
- 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.
- 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.
-
Hi and welcome to devnet,
Did you compile your plugin with the same version of Qt used to build Qt Creator ?
-
@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.
-
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.