Hi

I'm sitting with a problem where a qobject_cast fails when doing a cast across a DLL boundary.

I have a base class:

Qt Code:
  1. class Variable : public QObject
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. Variable(QObject* parent = 0);
  7. ~Variable();
  8. }
To copy to clipboard, switch view to plain text mode 

and a class which inherits Variable:
Qt Code:
  1. class MatrixReal : public Variable
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. MatrixReal();
  7. }
To copy to clipboard, switch view to plain text mode 

I create a MatrixReal* instance and cast it to a Variable*. When casting Variable* to MatrixReal* again later on in the same DLL it works. However if I send this Variable* to a different DLL and try to cast to MatrixReal* there it fails.

Any ideas on how to get this working would be much appreciated.

Thanks,
Jaco