MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
//ui->setupUi(this);
Form* form = new Form(this);
setCentralWidget(form);
this->setStyleSheet("background-color:red");
//form->showFullScreen();
}
the problem is no applying for red color allover the form and the applying is success if the form initialized in the main() function.



