Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved]Designer Plugin Template crashes Designer
I'm learning about custom widget plugins. I created a project from the Custom Designer Widget template. Compiled and copied the libxxx.dylib to the designer plugin directory. But, Designer is now crashing.
Is there some needed code to keep it from crashing?
I've also tried the Custom Widget Plugin example by copying the libcustomwidget.dylib to the designer/plugin directory. Designer crashes on startup. I must be missing a step, like maybe Designer needs to find the lib that implements the class.
BTW, I'm working on a locally compiled version installed to usr/local/trolltech.
Maybe there is a bug in your code (hard to tell without seeing the code)? Have you tried to debug the plugin?
I've made no changes to the example plug-in. I expect the shipping examples to work, but I've read that plug-in can be quite delicate. Yeah, time to get the debugger going.
goetz last edited by
Just tried with Qt 4.7.3 compiled manually, installed in /usr/local/Trolltech/Qt-4.7.3
sudo make install
That's all and it works like a charm.
Are your Designer and Qt versions matching?
Thanks, Volker. Your solution example helped me figure it out. The make install was installing to /Applications/developer/qt. The Designer in /Applications/developer/qt was a binary download and it crashes. When I move the dylib to the /usr/local/Trolltech install, the Designer there does not crash. Both Designers are 4.7.3, but one is a binary install and the other compiled.
BTW, I'd like for make install to install to /usr/local/Trolltech. Is there an easy way to manage the Qt environment variables? Would be nice at least if there was a web link that listed them and how to change them.
goetz last edited by
For our plugins we have this in the .pro. It installs the plugin into the right path, depending on the version it was built with:
INSTALLS += target
target.path = $$[QT_INSTALL_PLUGINS]/designer
TEMPLATE = lib
CONFIG += debug warn_on qt thread exceptions rtti designer plugin