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: Switch view QWidget * plugin::createWidget(const QString &feature, QWidget *p){ if(feature=="xxx"){ QWidget *w = new QWidget(p); MyLayout *l = new MyLayout(p); w->setLayout(l); return w; }} QWidget * plugin::createWidget(const QString &feature, QWidget *p){ if(feature=="xxx"){ QWidget *w = new QWidget(p); MyLayout *l = new MyLayout(p); w->setLayout(l); return w; } } To copy to clipboard, switch view to plain text mode This worked, thank you! Cristian
QWidget * plugin::createWidget(const QString &feature, QWidget *p){ if(feature=="xxx"){ QWidget *w = new QWidget(p); MyLayout *l = new MyLayout(p); w->setLayout(l); return w; }}
QWidget * plugin::createWidget(const QString &feature, QWidget *p){ if(feature=="xxx"){ QWidget *w = new QWidget(p); MyLayout *l = new MyLayout(p); w->setLayout(l); return w; } }
Forum Rules
Bookmarks