Class name mismatch for plugin
I'm using an evaluation version of Qt 4.4.0. I made a plugin that, other than creating a render area viewer instead of an examiner, is the same as SoQtWidgetPlugin.
Designer complains when this plugin is selected from the Widget Box:
"A class name mismatch occurred when creating a widget using the custom widget factory registered for widgets of class SoQtRenderAreaWidgetPlugin. It returned a widget of class SoQtWrapper."
Any ideas? The SoQtWidgetPlugin also returns a class SoQtWrapper, with no problem.
Thanks in advance for any help,
Martin
Re: Class name mismatch for plugin
I've only been using Qt a few days. I just realized that I can turn off the decoration for the viewer. But I still may want to make plugins for other purposes...
Re: Class name mismatch for plugin
The class declaration of the custom widget probably misses the necessary Q_OBJECT macro, thus Qt's meta object system is unable to detect correct class name but gets the base class name instead.
Re: Class name mismatch for plugin
Thanks for the suggestion. The declaration does contain Q_OBJECT; here is some more information about the problem.
The plugins actually almost work. I have one that's an examiner viewer that, when dragged onto the main widow generates the error message but works. The other one is a render area viewer. This one generates an error but then also creates an examiner viewer.
The strange thing is the the examiner plugin is Mercury's with the class/methods renamed, and the render area version is different by only one line - the SoQtWrapper is defaulted to RENDER_AREA instead of EXAMINER in the constructor.