PDA

View Full Version : QDesigner Crash when attempting to use a ported Qt3 Custom widget



degs2k4
8th February 2008, 14:14
Hello again,

First of all, thanks to everyone. I find this Forum very very useful !

Secondly, I'm trying to use a Qt3 custom widget in QDevelop under Qt4.

The plugin compiles perfectly, it just generates the .dll and .a files and then I put them under the Qt plugins directory. When I enter QDesigner, the C Widget appears in the designer widget toolbox , but then I open a new project, click over the widget and QDesigner crashes... (just by clicking over the widget)

What am I missing? Maybe it crashes because I am not specifying any .rc (resources) file?

I attach 2 files, the plugin .h and .cpp files.

Thanks!

wysota
8th February 2008, 14:19
QWidget *MyCanvasViewPlugin::createWidget(QWidget *parent)
{
//IconEditor a = new IconEditor(parent);
QWidget* a;
return a;
}
This is incorrect. You return an invalid pointer to a widget instead of a real widget.

degs2k4
8th February 2008, 14:31
Oh! I missed that... just copying and pasting all the time....

THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!