NewWindow
::NewWindow(QWidget *parent
) : ui(new Ui::NewWindow)
{
ui->setupUi(this);
this->setStyleSheet("background-color:gray");
w1 = new MainWindow(string ,this);//Custom Buttons object
QString string1
= "Emergency Help";
w2 = new MainWindow(string1 ,this);//Custom Buttons object
centralFrame->setStyleSheet("background-color:blue");
this->setCentralWidget(centralFrame);
layout->addWidget( w1,0,0);
layout->addWidget( w2,1,1);
centralFrame->setLayout(layout);
centralFrame->setGeometry(160,180,400,200);
}
NewWindow::NewWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::NewWindow)
{
ui->setupUi(this);
this->setStyleSheet("background-color:gray");
QString string = "Home profile";
w1 = new MainWindow(string ,this);//Custom Buttons object
QString string1 = "Emergency Help";
w2 = new MainWindow(string1 ,this);//Custom Buttons object
QFrame *centralFrame=new QFrame(this);
centralFrame->setStyleSheet("background-color:blue");
this->setCentralWidget(centralFrame);
QGridLayout *layout= new QGridLayout(centralFrame);
layout->addWidget( w1,0,0);
layout->addWidget( w2,1,1);
centralFrame->setLayout(layout);
centralFrame->setGeometry(160,180,400,200);
}
To copy to clipboard, switch view to plain text mode
]
Bookmarks