[Split] Problems with Qt Creator/Designer plugins
-
I see. Thank you for clarifying that for me. This brings me back to my earlier issue with making plugins for designer. Since the topic name is quite broad, i won't open up another for my plugin problems. I have two problems:
First one is invisible widgets: I have made a plugin class for the widget i described before(obviously not properly) and packaged it up into a shared library and copied it into two folders of the Qt SDK installation(in my case /opt/QtSDK/Desktop/Qt/473/gcc/lib and /opt/QtSDK/QtCreator/lib/qtcreator/plugins/designer/). The widget shows up properly, but when I drag and drop it to the form, it's just an invisible box.
Second problem is with the widget that needs a graph. I used Qwt library for making it, and best I've managed at integrating it into designer is to crash it completely whenever I start it up from the creator.
-
Moderator's note:
Just split off the question in a separate topic, as it was only loosely related to the "original thread":http://developer.qt.nokia.com/forums/viewthread/7092/ -
Okay. The source for the first one(invisibility problem) is here:
.../Creator_widgets/Mon/mon_widget.cpp: http://pastebin.com/Uy5se1qC
.../Creator_widgets/Mon/mon_widget.hpp: http://pastebin.com/ZBr3v128
.../Creator_widgets/Mon/mon_widget_plugin.cpp: http://pastebin.com/QwD7jK4K
.../Creator_widgets/Mon/mon_widget_plugin.hpp: http://pastebin.com/7ubkBEQC
.../Creator_widgets/Mon/Mon.pro: http://pastebin.com/uRmYWyPs
The resulting lib I then manually copy to the locations I mentioned in the earlier post. -
The source for the second one(segmentation fault -> creator/designer crash) is here:
../Creator_widgets/QtCAgraph/qtcagraph.cpp: http://pastebin.com/2yxqBAS1
../Creator_widgets/QtCAgraph/qtcagraph.hpp: http://pastebin.com/gXnN7eXc
../Creator_widgets/QtCAgraph/qtcagraphplugin.cpp: http://pastebin.com/r44wsG4r
../Creator_widgets/QtCAgraph/qtcagraphplugin.hpp: http://pastebin.com/Q4CZbYZF
../Creator_widgets/QtCAgraph/QtCAgraph.pro: http://pastebin.com/yPBcJ2zu
Again, the resulting libQtCAgraph.so is copied in those two destinations. -
OK, an update to my problem: by commenting out all delete statements in the destructor for the widget it works and doesn't crash anymore. Even though I have somewhat of a sloppy class, it kindof works. It occurs to me that before I began to plugin-ise the widget I encountered the same thing somewhere around the delete statement for the plot or curve object in the destructor.