[Qt-interest] qobject_cast<>() and objects from dynamically loadedlibraries
Acenes
acenes at gmx.net
Wed Jan 21 16:23:30 CET 2009
Make sure to use the Qt export/import declarations so the static metaobject
is also exported from the dll:
#ifdef BUILDING_MY_DLL
# define MYDLL_EXPORT Q_DECL_EXPORT
#else
# define MYDLL_EXPORT Q_DECL_IMPORT
#endif
class MYDLL_EXPORT Base: public QWidget
{
Q_OBJECT
};
class MYDLL_EXPORT SomeImpl: public Base
{
Q_OBJECT
};
More information about the Qt-interest-old
mailing list