Hi, im developing a small desktop application from my ubuntu qtCreator.. and ive having an error im not able to solve.

this is the relevant code:
Qt Code:
  1. QWidget *nw = new QWidget();
  2. std::string final = "some text here";
  3. QLabel *lblText = new QLabel(QString::fromStdString(final));
  4. QVBoxLayout *mainLayout = new QVBoxLayout;
  5. mainLayout->addWidget(lblText);
  6. nw->setLayout(mainLayout);
  7. ui->tabNews->addTab(nw, tr("Confirmation"));
To copy to clipboard, switch view to plain text mode 
the error is:
QObject::setParent: Cannot set parent, new parent is in a different thread

ive previosly done a custom widget on a ui file and tried to load it on that tab with the same result and tried to create the widget on the same class where this window is created... with the same result.

Can anyone see the problem with this little code? :S im not explicitelly using threads on the view layer...