Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "studentbrowser.h"
- #include <QBoxLayout>
- StudentBrowser::StudentBrowser(QWidget *parent) :
- QMainWindow(parent)
- {
- this->createView();
- this->createActions();
- this->createMenu();
- }
- void StudentBrowser::createView() {
- this->hLayout = new QHBoxLayout();
- this->vLayout = new QVBoxLayout();
- this->buttonLayout = new QHBoxLayout;
- this->firstNameLabel = new QLabel("Etunimi");
- this->lastNameLabel = new QLabel("Sukunimi");
- this->gradeLabel = new QLabel("Arvosana: ");
- this->grade = new QLabel("5");
- this->cw = new QWidget();
- this->next = new QPushButton(">>");
- this->previous = new QPushButton("<<");
- vLayout->addWidget(this->firstNameLabel);
- vLayout->addWidget(this->lastNameLabel);
- hLayout->addWidget(this->gradeLabel);
- hLayout->addWidget(this->grade);
- hLayout->addStretch(0);
- buttonLayout->addWidget((this->previous));
- buttonLayout->addWidget(this->next);
- //Asetetaan centralwidgetille layout
- vLayout->addLayout(hLayout);
- vLayout->addLayout(buttonLayout);
- cw->setLayout(vLayout);
- //cw->setLayout(hLayout);
- //asettaa mainwindow oliolle keskuwidget
- this->setCentralWidget(cw);
- }
- void StudentBrowser::createActions(){
- }
- void StudentBrowser::createMenu(){
- }
Add Comment
Please, Sign In to add comment