Instead of making the plugin itself a QWidget, make it allocate and return a QWidget when requested, more or less like this:
Qt Code:
  1. class MyPluginInterface
  2. {
  3. ...
  4. QWidget* createWidget(QWidget* parent) = 0;
  5. ...
  6. };
To copy to clipboard, switch view to plain text mode