i created a form (widget ) and i called it from main window ...... the problem is that no applying for style sheet for this form\



MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
Form* form = new Form(this);
setCentralWidget(form);
}



Form::Form(QWidget *parent) :
QWidget(parent),
ui(new Ui::Form)
{
ui->setupUi(this);
this->setStyleSheet("background-color:red;border-style:none");
}

no applying for red background color ?? !! Why ??