Quote Originally Posted by hesummar View Post
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>>.
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.

Quote Originally Posted by hesummar View Post
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?
It's only relevant on windows where you have to export classes explicitly. Ask Google about __declspec(dllimport) and __declspec(dllexport).