It is still have this problem,Can someone give me a example? Thank you! hesummar@126.com
It is still have this problem,Can someone give me a example? Thank you! hesummar@126.com
Yes , really . My operation system is suse linux 10.1 .
Maybe Qt Designer doesn't look for plugins in that directory? Check "Plugin Paths" in Edit -> Preferences.
I found that the Qt designer didn't look for plugins in that directory , after I edited the plugins paths , The Qt designer still didn't see that plugins , Please give me an example .
Add Q_OBJECT macro to CustomWidgetPlugin definition.
In my file ,it already had this macro , but i found that in the Qt designer manual the example about create custom widget example is different from the one in <<c++ programming with Qt3>>. In the Qt designer manual the example has QT_WIDGET_PLUGIN_EXPORT macro , but the one in <<c++ programming with Qt3>> doesn't have . Can you tell me why? and please give me an example whitch one can work very well in your machine .
Well to give you a simple answer !!
This is a link (http://www.wysota.eu.org/wwwidgets/ ) to the widget made by wysota. Why don't you try downloading those and see if it loads properly in designer ? And if it does, You can compare and see what is wrong.
We can't solve problems by using the same kind of thinking we used when we created them
The code for that example is available in $QTDIR/tools/designer/examples/filechooser/. To make it work on my system I had to add CONFIG += thread to plugin.pro file, Q_OBJECT macro to CustomWidgetPlugin class and a proper path to Qt Designer (note that if you add /some/path/plugins to "Plugin Paths" in Qt Designer, it will look for the plugin in /some/path/plugins/designer). Also try running Qt Designer from the console --- it might output some message explaining what's wrong.
It's only relevant on windows where you have to export classes explicitly. Ask Google about __declspec(dllimport) and __declspec(dllexport).
Hi hesummar:
I have a similar problem in qt 3.3.4 with designer 3.3.4. Even when the path was added with qtconfig, and apparently accepted by designer, my plugins did'nt work.
I found out that, at least with my version of qt, if the plugin lib was in a directory different from the one in qt3 tree (/usr/lib/qt3/plugins/designer/), the plugin was not recognized by designer.
¿Have you tried puting the plugin in that directory?
Bye.
Thank you ! I found that the plugins in http://www.wysota.eu.org/wwwidgets/ could work very well in my machine . I will check where was wrong .
Bookmarks