Hi, this is my first post here

I'm trying to realize an embedded application framework based on Qt 4.5 (Qt Embedded for Linux) similar to Qtopia/QtExtended.

I want to implement a dynamic loader for third-party applications, so I'm using the Qt plugin system. I have my application interface class:

Qt Code:
  1. class pkApplication
  2. {
  3. public:
  4. enum { InvalidId = 0 };
  5.  
  6. public:
  7. virtual ~pkApplication() {};
  8.  
  9. virtual unsigned int id() const = 0;
  10. virtual bool startUp(QWidget *parent = 0) = 0;
  11. };
  12.  
  13. Q_DECLARE_INTERFACE(pkApplication, "it.card-tech.pk.pkApplication/1.0");
To copy to clipboard, switch view to plain text mode 

Then, my base application mixin class (it implements application low-level logic and it inherits from QObject):

Qt Code:
  1. class pkApplicationBase : public QObject, public pkApplication
  2. {
  3. Q_OBJECT
  4.  
  5. private:
  6. static unsigned int s_idCounter;
  7. static QList<unsigned int> s_freeIds;
  8. unsigned int m_id;
  9.  
  10. public:
  11. pkApplicationBase();
  12. virtual ~pkApplicationBase();
  13.  
  14. unsigned int id() const;
  15.  
  16. private:
  17. unsigned int nextFreeId();
  18. };
To copy to clipboard, switch view to plain text mode 

And, at the end, my concrete example application:

Qt Code:
  1. class ExampleApp : public pkApplicationBase
  2. {
  3. Q_OBJECT
  4. Q_INTERFACES(pkApplication)
  5.  
  6. public:
  7. ExampleApp();
  8.  
  9. bool startUp(QWidget* parent);
  10.  
  11. QDialog* w;
  12. };
To copy to clipboard, switch view to plain text mode 

(with Q_EXPORT_PLUGIN2(exampleapp, ExampleApp) line in the source file).

This configuration doesn't work even if it respects pure interface and no-qobject-inheritance (on pkApplication) rules.

If I inherit ExampleApp directly from pkApplication everything works (obviously with some changes here and there).

Could you help me to find a solution for this problem, please?