0

I am new to Qt. I try to install the designer plugin on Mac OSX 10.10 that is provided by qglviewer. I do as the http://libqglviewer.com/installUnix.html#plugin says. I successfully compile and install the plugins.

cd designerPlugin
qmake
make
make install

However, I still cannot find the widget in the qt designer. My Qt is 5.4. The plugins(libqwebview.dylib) in really in the $QTDIR/plugins/designer but the designer just doesn't load it. Other three plugins like libqdeclarativeview.dylib in $QTDIR/plugins/designer is loaded in the designer.

How can I load the plugin in my qt designer?Thanks for your help!

Shawn
  • 167
  • 1
  • 1
  • 10
  • That's usually because your plugin couldn't be loaded because it didn't implement the right interfaces or it links to some other libraries/frameworks that couldn't be found. I think you can look in Qt Designer in Help -> About Plugins to find more information. Or maybe the QT_DEBUG_PLUGINS environment variable works for Qt Designer too. – Hamish Moffatt Jul 06 '15 at 01:19
  • Are you sure that you've built your plugin with the Qt version that has the same binary compatibility key as the one used to build Qt Designer? This might not necessarily be the case. – Kuba hasn't forgotten Monica Jul 06 '15 at 12:48
  • @KubaOber I have tried it in both Qt creator3.3 and 3.4. Neither worked. – Shawn Jul 12 '15 at 05:41
  • @HamishMoffatt Sorry, I am new to learn Qt and mac. I don't know what to do about the environment variable. – Shawn Jul 12 '15 at 05:43
  • Yes, you tried, but again: how do you know that your code was compiled using the same version of **Qt** (not Qt Creator, that's just an IDE) that *someone else* used to compile Qt Designer with? – Kuba hasn't forgotten Monica Jul 12 '15 at 13:34
  • Adding the environment variables and seeing the output is a bit of a pain on Mac. Run from the Console, `export QT_DEBUG_PLUGINS=1`, then `/bin/Designer.app/Contents/MacOS/Designer`. – Hamish Moffatt Jul 13 '15 at 01:51

1 Answers1

1

Qt Creator is just an IDE, so let's forget about it for a moment. Its version is irrelevant.

We have following objects that we must pay attention to:

  1. The version of Qt (not Qt Creator) that you're compiling the plugin with.

  2. The version of Qt that someone else used to compile the Qt Designer with.

  3. The Qt Designer that someone else had compiled, that you're using.

You must ensure that 1 and 2 are binary compatible and have the same binary compatibility key. Only then will 3 load your plugin.

The simplest way of ensuring that is to compile your plugin and Qt Designer using the same version of Qt.

Simply download Qt Designer sources, open them up in Qt Creator, and compile them, just as you did for your plugin.

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313