Quote Originally Posted by wysota
No, it has to be QWidget. You can cheat a little though and return an empty QWidget just with your layout set (just remember the widget has to be marked as a container).

I don't remember the exact syntax, but it's something like this:
Qt Code:
  1. QWidget * plugin::createWidget(const QString &feature, QWidget *p){
  2. if(feature=="xxx"){
  3. QWidget *w = new QWidget(p);
  4. MyLayout *l = new MyLayout(p);
  5. w->setLayout(l);
  6. return w;
  7. }
  8. }
To copy to clipboard, switch view to plain text mode 

This worked, thank you!
Cristian