Hi
i am setting a gridlayout in frame which is child class of MainWindow , but the widget which i set on layout are not gett display.Where i am wrong.My code is

Qt Code:
  1. NewWindow::NewWindow(QWidget *parent) :
  2. QMainWindow(parent),
  3. ui(new Ui::NewWindow)
  4. {
  5. ui->setupUi(this);
  6. this->setStyleSheet("background-color:gray");
  7. QString string = "Home profile";
  8. w1 = new MainWindow(string ,this);//Custom Buttons object
  9. QString string1 = "Emergency Help";
  10. w2 = new MainWindow(string1 ,this);//Custom Buttons object
  11. QFrame *centralFrame=new QFrame(this);
  12. centralFrame->setStyleSheet("background-color:blue");
  13. this->setCentralWidget(centralFrame);
  14. QGridLayout *layout= new QGridLayout(centralFrame);
  15. layout->addWidget( w1,0,0);
  16. layout->addWidget( w2,1,1);
  17. centralFrame->setLayout(layout);
  18. centralFrame->setGeometry(160,180,400,200);
  19. }
To copy to clipboard, switch view to plain text mode 
]

Thanks
Waiting for your reply.