UIRePrint::UIRePrint(QDialog *parent,Qt::WindowFlags f) : QDialog(parent,f) { QObject::installEventFilter(this); RemoveKeyEventBug(); QPixmap bg; bg.load(":/images/commonbg.png"); QPalette palette; palette.setBrush(backgroundRole(),QBrush(bg)); this->setPalette(palette); this->setAutoFillBackground(true); this->setAttribute(Qt::WA_DeleteOnClose); this->setGeometry(0,FRAME420_THVALUE,FRAME420_WIDTH,FRAME420_HEIGHT); this->setFixedSize(FRAME420_WIDTH,FRAME420_HEIGHT); QFont font("Helvetica",12,QFont::Bold); QFont font2("Helvetica",14,QFont::Bold); QFont font3("Helvetica",14); this->setStyleSheet("QDialog{border: 3px solid silver;}"); lbHead=new QLabel(); QFont fontH("Helvetica",18,QFont::Bold); lbHead->setText(tr("Print")); lbHead->setFont(fontH); lbHead->setAlignment(Qt::AlignCenter); lbHead->setMinimumHeight(40); lbHead->setMaximumHeight(40); lbHead->setStyleSheet(HEAD_STYLE); lbHead->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); //--------------define--------------------// btnRePrintLast=new QPushButton(); btnRePrintWhich=new QPushButton(); btnPrintAudit=new QPushButton(); btnPrintSettle=new QPushButton(); btnRePrintLast->setText("Reprint Last "); btnRePrintWhich->setText("Reprint At Will"); btnPrintAudit->setText("Print Audit"); btnPrintSettle->setText("Print Settle"); btnRePrintLast->setFont(font2); btnRePrintWhich->setFont(font2); btnPrintAudit->setFont(font2); btnPrintSettle->setFont(font2); btnRePrintLast->setStyleSheet(BTN_MENU_STYLE); btnRePrintWhich->setStyleSheet(BTN_MENU_STYLE); btnPrintAudit->setStyleSheet(BTN_MENU_STYLE); btnPrintSettle->setStyleSheet(BTN_MENU_STYLE); btnRePrintLast->setMinimumHeight(40); btnRePrintLast->setMaximumHeight(40); btnRePrintWhich->setMinimumHeight(40); btnRePrintWhich->setMaximumHeight(40); btnPrintAudit->setMinimumHeight(40); btnPrintAudit->setMaximumHeight(40); btnPrintSettle->setMinimumHeight(40); btnPrintSettle->setMaximumHeight(40); // ---------------------------------- // btnCancel=new QPushButton; btnCancel->setText(tr("Cancel")); btnCancel->setFont(font2); btnCancel->setMinimumHeight(30); btnCancel->setStyleSheet(BTN_GREY_STYLE); QSpacerItem *sp1=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QSpacerItem *sp2=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QVBoxLayout *v1Lay=new QVBoxLayout(); v1Lay->addItem(sp1); v1Lay->addWidget(btnRePrintLast); v1Lay->addWidget(btnRePrintWhich); v1Lay->addWidget(btnPrintAudit); v1Lay->addWidget(btnPrintSettle); v1Lay->addItem(sp2); QHBoxLayout *h2Lay=new QHBoxLayout(); // h2Lay->addSpacing(10); h2Lay->addWidget(btnCancel); // h2Lay->addSpacing(10); QVBoxLayout *layout=new QVBoxLayout(this); layout->addWidget(lbHead); layout->addLayout(v1Lay); layout->addLayout(h2Lay); connect(btnRePrintLast,SIGNAL(clicked()),this,SLOT(slotReprintLast())); connect(btnRePrintWhich,SIGNAL(clicked()),this,SLOT(slotReprintWhich())); connect(btnPrintAudit,SIGNAL(clicked()),this,SLOT(slotPrintAudit())); connect(btnPrintSettle,SIGNAL(clicked()),this,SLOT(slotPrintSettle())); connect(btnCancel, SIGNAL(clicked()), this, SLOT(close())); //Animation QPropertyAnimation *animation1 = new QPropertyAnimation(this, "pos"); animation1->setDuration(100); animation1->setStartValue(mapToParent(QPoint(FRAME420_WIDTH, 0))); animation1->setEndValue(mapToParent(QPoint(0, 0))); animation1->setEasingCurve(QEasingCurve::OutQuint); animation1->start(); this->setAutoClose(g_constantParam.TIMEOUT_UI); }
UIMsg::UIMsg(ErrorType errortype, long errorCode, QDialog *parent, Qt::WindowFlags f) : QDialog(parent,f) { // 初始化错误代码 this->initalErrorMsg(); this->initalNoticeMsg(); this->initalFileErrorMsg(); this->initalCommErrorMsg(); this->initalHostErrorMsg(); QPixmap bg; bg.load(":/images/commonbg.png"); QPalette palette; palette.setBrush(backgroundRole(),QBrush(bg)); this->setPalette(palette); this->setAutoFillBackground(true); this->setAttribute(Qt::WA_DeleteOnClose); this->setGeometry(20,FRAME420_THVALUE+50,FRAME420_WIDTH,FRAME420_HEIGHT-50); this->setFixedSize(FRAME420_WIDTH-40,FRAME420_HEIGHT-80); this->setStyleSheet("QDialog{border: 6px solid silver;}"); QFont font("Helvetica",12,QFont::Bold); QFont font2("Helvetica",14,QFont::Bold); QFont font3("Helvetica",8,QFont::Bold); //--------------define--------------------// lbHead=new QLabel(); QFont fontH("Helvetica",18,QFont::Bold); lbHead->setFont(fontH); lbHead->setAlignment(Qt::AlignCenter); lbHead->setMinimumHeight(40); lbHead->setMaximumHeight(40); lbHead->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); lbMsg=new QLabel(); lbReturnCode=new QLabel(); lbMsg->setFont(font2); lbReturnCode->setFont(font2); lbMsg->setAlignment(Qt::AlignCenter); lbReturnCode->setAlignment(Qt::AlignCenter); lbMsg->setMinimumHeight(40); lbReturnCode->setMinimumHeight(40); btnSubmit=new QPushButton; btnSubmit->setText(tr("OK")); btnSubmit->setFont(font2); btnSubmit->setMinimumHeight(30); btnSubmit->setStyleSheet(BTN_GREY_STYLE); this->beepTwice(); //beep switch(errortype) { case HOST_ERROR: { lbHead->setText("HOST ERROR"); lbHead->setStyleSheet("background-color: rgb(255,0,0);"); lbMsg->setText(hashHostError.value(HostErrIndex(errorCode))); break; } default: break; } QString hostCode=QString::number(errorCode); lbReturnCode->setText("Return Code : "+hostCode); // -----------layout------------// QSpacerItem *sp1=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QSpacerItem *sp2=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QSpacerItem *sp3=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QHBoxLayout *h1Lay=new QHBoxLayout(); h1Lay->addSpacing(6); h1Lay->addWidget(lbHead); h1Lay->addSpacing(6); QVBoxLayout *v1Lay=new QVBoxLayout(); v1Lay->addSpacing(6); v1Lay->addLayout(h1Lay); v1Lay->addItem(sp1); v1Lay->addWidget(lbMsg); v1Lay->addItem(sp2); v1Lay->addWidget(lbReturnCode); v1Lay->addItem(sp3); QHBoxLayout *h2Lay=new QHBoxLayout(); h2Lay->addSpacing(10); h2Lay->addWidget(btnSubmit); h2Lay->addSpacing(10); QVBoxLayout *layout=new QVBoxLayout(this); layout->addLayout(v1Lay); layout->addLayout(h2Lay); layout->setContentsMargins(0,0,0,10); connect(btnSubmit,SIGNAL(clicked()),this,SLOT(close())); }
UIMsg::UIMsg(ErrorType errortype, unsigned char ucErrorCode, QDialog *parent, Qt::WindowFlags f) : QDialog(parent,f) { // 初始化错误代码 this->initalErrorMsg(); this->initalNoticeMsg(); this->initalFileErrorMsg(); this->initalCommErrorMsg(); this->initalHostErrorMsg(); QPixmap bg; bg.load(":/images/commonbg.png"); QPalette palette; palette.setBrush(backgroundRole(),QBrush(bg)); this->setPalette(palette); this->setAutoFillBackground(true); this->setAttribute(Qt::WA_DeleteOnClose); this->setGeometry(20,FRAME420_THVALUE+50,FRAME420_WIDTH,FRAME420_HEIGHT-50); this->setFixedSize(FRAME420_WIDTH-40,FRAME420_HEIGHT-80); this->setStyleSheet("QDialog{border: 6px solid silver;}"); QFont font("Helvetica",12,QFont::Bold); QFont font2("Helvetica",14,QFont::Bold); QFont font3("Helvetica",8,QFont::Bold); //--------------define--------------------// lbHead=new QLabel(); QFont fontH("Helvetica",18,QFont::Bold); lbHead->setFont(fontH); lbHead->setAlignment(Qt::AlignCenter); lbHead->setMinimumHeight(40); lbHead->setMaximumHeight(40); lbHead->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); lbMsg=new QLabel(); lbReturnCode=new QLabel(); lbMsg->setFont(font2); lbReturnCode->setFont(font2); lbMsg->setAlignment(Qt::AlignCenter); lbReturnCode->setAlignment(Qt::AlignCenter); lbMsg->setMinimumHeight(40); lbReturnCode->setMinimumHeight(40); btnSubmit=new QPushButton; btnSubmit->setText(tr("OK")); btnSubmit->setFont(font2); btnSubmit->setMinimumHeight(30); btnSubmit->setStyleSheet(BTN_GREY_STYLE); this->beepTwice(); //beep switch(errortype) { case NORMAL_ERROR: { lbHead->setText("ERROR"); lbHead->setStyleSheet("background-color: rgb(255,0,0);"); lbMsg->setText(hashError.value(ErrIndex(ucErrorCode))); break; } case NOTICE_ERROR: { lbHead->setText("NOTICE"); lbHead->setStyleSheet("background-color: rgb(0, 153, 255);"); lbMsg->setText(hashNotice.value(MsgTabIndex(ucErrorCode))); break; } case FILE_ERROR: { lbHead->setText("FILE ERROR"); lbHead->setStyleSheet("background-color: rgb(255,0,0);"); lbMsg->setText(hashFileError.value(FileErrIndex(ucErrorCode))); break; } case COMM_ERROR: { lbHead->setText("COMM ERROR"); lbHead->setStyleSheet("background-color: rgb(255,0,0);"); lbMsg->setText(hashCommError.value(CommsErrIndex(ucErrorCode))); break; } case HOST_ERROR: { qDebug()<<"不应该在这里处理"; break; } } unsigned char ucCode; ucCode = ucErrorCode; unsigned char aucErrorCode[PARAM_ANSWER_LEN + 1] = {0}; hex_str(aucErrorCode, &ucCode, PARAM_ANSWER_LEN); lbReturnCode->setText("Return Code : "+QString::fromAscii((const char*)aucErrorCode)); // -----------layout------------// QSpacerItem *sp1=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QSpacerItem *sp2=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QSpacerItem *sp3=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QHBoxLayout *h1Lay=new QHBoxLayout(); h1Lay->addSpacing(6); h1Lay->addWidget(lbHead); h1Lay->addSpacing(6); QVBoxLayout *v1Lay=new QVBoxLayout(); v1Lay->addSpacing(6); v1Lay->addLayout(h1Lay); v1Lay->addItem(sp1); v1Lay->addWidget(lbMsg); v1Lay->addItem(sp2); if(errortype!=NOTICE_ERROR) { v1Lay->addWidget(lbReturnCode); } v1Lay->addItem(sp3); QHBoxLayout *h2Lay=new QHBoxLayout(); h2Lay->addSpacing(10); h2Lay->addWidget(btnSubmit); h2Lay->addSpacing(10); QVBoxLayout *layout=new QVBoxLayout(this); layout->addLayout(v1Lay); layout->addLayout(h2Lay); layout->setContentsMargins(0,0,0,10); connect(btnSubmit,SIGNAL(clicked()),this,SLOT(close())); }
UIInputAmount::UIInputAmount(QDialog *parent,Qt::WindowFlags f) : QDialog(parent,f) { qDebug()<<Q_FUNC_INFO; // RemoveKeyEventBug(); QObject::installEventFilter(this); FLAG_ADJUST=false; QPixmap bg; bg.load(":/images/commonbg.png"); QPalette palette; palette.setBrush(backgroundRole(),QBrush(bg)); this->setPalette(palette); this->setAutoFillBackground(true); this->setAttribute(Qt::WA_DeleteOnClose); this->setGeometry(0,FRAME420_THVALUE+40,FRAME420_WIDTH,FRAME420_HEIGHT-40); this->setFixedSize(FRAME420_WIDTH,FRAME420_HEIGHT-40); this->setStyleSheet("QDialog{border: 3px solid silver;}"); QFont font("Helvetica",12,QFont::Bold); QFont font2("Helvetica",14,QFont::Bold); QFont font3("Helvetica",8,QFont::Bold); lbHead=new QLabel(); QFont fontH("Helvetica",18,QFont::Bold); lbHead->setText(tr("Transaction Amount")); lbHead->setFont(fontH); lbHead->setAlignment(Qt::AlignCenter); lbHead->setMinimumHeight(40); lbHead->setMaximumHeight(40); lbHead->setStyleSheet(HEAD_STYLE); lbHead->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); //--------------define--------------------// lbInput=new QLabel(); lbPic=new QLabel(); lbPic->setPixmap(QPixmap(":/icons/amount.png")); lbPic->setAlignment(Qt::AlignCenter); lbInput->setText("Please Enter The Amount:"); lbInput->setFont(font); lbInput->setAlignment(Qt::AlignCenter); // input amount leAmount=new QLineEdit(); leAmount->setAlignment(Qt::AlignCenter); leAmount->setFocus(); leAmount->setFont(font); leAmount->setStyleSheet("border: 3px solid silver;border-radius: 6px;"); leAmount->setMinimumHeight(35); leAmount->setMaxLength(10); unsigned long ulinitAmt=0; unsigned char aucBuf[20] = {0}; memset(aucBuf,0,sizeof(aucBuf)); FormAmount(aucBuf,ulinitAmt,2); leAmount->setText(QString::fromAscii((const char *)aucBuf)); // const QString REGEX_AMOUNT = "^[-]?[\\d]{1,10}([.]{1}[\\d]{1,2})?$"; // QRegExp regx(REGEX_AMOUNT); // QValidator *validator = new QRegExpValidator(regx, leAmount); // leAmount->setValidator(validator); // QSpacerItem *hSpacer; btnCancel=new QPushButton; btnSubmit=new QPushButton; btnCancel->setText(tr("Cancel")); btnSubmit->setText(tr("Submit")); btnCancel->setFont(font2); btnSubmit->setFont(font2); btnCancel->setMinimumHeight(30); btnSubmit->setMinimumHeight(30); btnCancel->setStyleSheet(BTN_BLUE_STYLE); btnSubmit->setStyleSheet(BTN_GREEN_STYLE); // QSpacerItem *sp=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QVBoxLayout *v1Lay=new QVBoxLayout(); v1Lay->addWidget(lbPic); v1Lay->addWidget(lbInput); v1Lay->addWidget(leAmount); QHBoxLayout *h2Lay=new QHBoxLayout(); // h2Lay->addSpacing(10); h2Lay->addWidget(btnCancel); h2Lay->addWidget(btnSubmit); // h2Lay->addSpacing(10); QVBoxLayout *layout=new QVBoxLayout(this); layout->addWidget(lbHead); layout->addLayout(v1Lay); layout->addLayout(h2Lay); connect(btnCancel, SIGNAL(clicked()), this, SLOT(slotQuitTrans())); connect(btnSubmit,SIGNAL(clicked()),this,SLOT(slotAmountInputComplete())); // 金额输入 connect(leAmount,SIGNAL(textChanged(QString)),this,SLOT(slotSaveAmount(QString))); connect(leAmount,SIGNAL(textEdited(QString)),this,SLOT(slotSaveAmount(QString))); //Animation QPropertyAnimation *animation1 = new QPropertyAnimation(this, "pos"); animation1->setDuration(100); animation1->setStartValue(mapToParent(QPoint(FRAME420_WIDTH, 0))); animation1->setEndValue(mapToParent(QPoint(0, 0))); animation1->setEasingCurve(QEasingCurve::OutQuint); animation1->start(); this->setAutoClose(g_constantParam.TIMEOUT_UI); }
UIReportQuery::UIReportQuery(QDialog *parent,Qt::WindowFlags f) : QDialog(parent,f) { QObject::installEventFilter(this); RemoveKeyEventBug(); QPixmap bg; bg.load(":/images/commonbg.png"); QPalette palette; palette.setBrush(backgroundRole(),QBrush(bg)); this->setPalette(palette); this->setAutoFillBackground(true); this->setAttribute(Qt::WA_DeleteOnClose); this->setGeometry(0,FRAME420_THVALUE,FRAME420_WIDTH,FRAME420_HEIGHT); this->setFixedSize(FRAME420_WIDTH,FRAME420_HEIGHT); QFont font("Helvetica",12,QFont::Bold); QFont font2("Helvetica",14,QFont::Bold); QFont font3("Helvetica",14); this->setStyleSheet("QDialog{border: 3px solid silver;}"); lbHead=new QLabel(); QFont fontH("Helvetica",18,QFont::Bold); lbHead->setText(tr("Transaction List")); lbHead->setFont(fontH); lbHead->setAlignment(Qt::AlignCenter); lbHead->setMinimumHeight(40); lbHead->setMaximumHeight(40); lbHead->setStyleSheet(HEAD_STYLE); lbHead->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); //--------------define--------------------// tbTransList=new QTableWidget(); tbTransList->setFrameShape(QFrame::NoFrame); tbTransList->setEditTriggers(QAbstractItemView::NoEditTriggers); tbTransList->setSelectionMode(QAbstractItemView::SingleSelection); tbTransList->setSelectionBehavior(QAbstractItemView::SelectRows); tbTransList->horizontalHeader()->setVisible(false); tbTransList->horizontalHeader()->setDefaultSectionSize(130); tbTransList->horizontalHeader()->setStretchLastSection(true); tbTransList->verticalHeader()->setVisible(false); tbTransList->verticalScrollBar()->setStyleSheet(SCROLL_VERTICAL_STYLE); // ---------------------------------- // btnCancel=new QPushButton; btnSubmit=new QPushButton; btnCancel->setText(tr("Cancel")); btnSubmit->setText(tr("Detail")); btnCancel->setFont(font2); btnSubmit->setFont(font2); btnCancel->setMinimumHeight(30); btnSubmit->setMinimumHeight(30); btnCancel->setStyleSheet(BTN_BLUE_STYLE); btnSubmit->setStyleSheet(BTN_GREEN_STYLE); // QSpacerItem *sp1=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); // QSpacerItem *sp2=new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Expanding); QVBoxLayout *v1Lay=new QVBoxLayout(); // v1Lay->addItem(sp1); v1Lay->addWidget(tbTransList); // v1Lay->addItem(sp2); QHBoxLayout *h2Lay=new QHBoxLayout(); // h2Lay->addSpacing(10); h2Lay->addWidget(btnCancel); h2Lay->addWidget(btnSubmit); // h2Lay->addSpacing(10); QVBoxLayout *layout=new QVBoxLayout(this); layout->addWidget(lbHead); layout->addLayout(v1Lay); layout->addLayout(h2Lay); connect(btnCancel, SIGNAL(clicked()), this, SLOT(close())); connect(btnSubmit, SIGNAL(clicked()), this, SLOT(slotDetailClicked())); connect(tbTransList,SIGNAL(viewportEntered()),this,SLOT(restartTimeOut())); connect(tbTransList,SIGNAL(clicked(QModelIndex)),this,SLOT(restartTimeOut())); connect(tbTransList->verticalScrollBar(),SIGNAL(sliderMoved(int)),this,SLOT(restartTimeOut())); //Animation QPropertyAnimation *animation1 = new QPropertyAnimation(this, "pos"); animation1->setDuration(100); animation1->setStartValue(mapToParent(QPoint(FRAME420_WIDTH, 0))); animation1->setEndValue(mapToParent(QPoint(0, 0))); animation1->setEasingCurve(QEasingCurve::OutQuint); animation1->start(); this->ergodicTrans(); //遍历交易 this->setAutoClose(g_constantParam.TIMEOUT_UI); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { /* Erstellung des Fensterlayouts*/ this->setCentralWidget(fenster);; fenster->setWindowTitle("Project VON"); /*----- Westpart wird designed -----*/ /*Label Optionen mit einer bestimmten Form*/ QFont font1( "Calibri", 20, QFont::Bold); option->setFont(font1); option->setAlignment(Qt::AlignHCenter | Qt::AlignTop); option->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Maximum); /*Hintergrundfarben mit ihrem Label Hintergrund */ QFont font2( "Calibri", 10, QFont::Bold); hintergrund->setFont(font2); QPushButton *schwarz = new QPushButton(); schwarz->setStyleSheet("background-color: black"); QObject::connect(schwarz, &QPushButton::clicked,this, &MainWindow::schwarz); QPushButton *weiss = new QPushButton(); weiss->setStyleSheet("background-color: white"); QObject::connect(weiss, &QPushButton::clicked,this, &MainWindow::weiss); QPushButton *beige = new QPushButton(); beige->setStyleSheet("background-color: beige"); QObject::connect(beige, &QPushButton::clicked,this, &MainWindow::beige); QPushButton *rose = new QPushButton(); rose->setStyleSheet("background-color: pink"); QObject::connect(rose, &QPushButton::clicked,this, &MainWindow::pink); QGridLayout *farben = new QGridLayout(); QGridLayout *farb = new QGridLayout(); QWidget *farbenWidget = new QWidget(); farb->addWidget(schwarz,0,0); farb->addWidget(weiss,0,1); farb->addWidget(beige,0,2); farb->addWidget(rose,0,3); farben->addWidget(hintergrund,0,0); farben->addLayout(farb,1,0); farbenWidget->setLayout(farben); /*Bilderanzahl als Buttons mit dem Label "Anzahl Bilder"*/ QFont font3( "Calibri", 10, QFont::Bold); anzahlBilder->setFont(font3); QGridLayout *bilder = new QGridLayout(); QGridLayout *bild = new QGridLayout(); bild->addWidget(zwanzig,1,0); bild->addWidget(vierzig,1,1); bild->addWidget(sechsig,1,2); bilder->addWidget(anzahlBilder,0,0); bilder->addLayout(bild,1,0); QWidget *bilderWidget = new QWidget(); bilderWidget->setLayout(bilder); /*Einstellung des Vollbildmoduses mit dem Label*/ QFont font4( "Calibri", 10, QFont::Bold); vollbild->setFont(font4); QVBoxLayout *voll = new QVBoxLayout(); voll->addWidget(vollbild); voll->addWidget(vollbildmodus); QWidget *vollWidget = new QWidget(); vollWidget->setLayout(voll); /*Filter zur Behandlung ihrer Bildermenge + Label Filter*/ QFont font5( "Calibri", 10, QFont::Bold); filter->setFont(font5); QLineEdit *filtern = new QLineEdit(); QGridLayout *filt = new QGridLayout(); filt->addWidget(filter,0,1); filt->addWidget(filtern,2,1); QWidget *filterWidget = new QWidget(); filterWidget->setLayout(filt); menu->addWidget(option); menu->addWidget(farbenWidget, 0, Qt::AlignLeft | Qt::AlignTop); menu->addWidget(bilderWidget, 0, Qt::AlignLeft | Qt::AlignTop); menu->addWidget(vollWidget, 0, Qt::AlignLeft | Qt::AlignTop); menu->addWidget(filterWidget, 0, Qt::AlignLeft | Qt::AlignTop); QVBoxLayout *menu2 = new QVBoxLayout(); menu->insertStretch(300,30); menu->addLayout(menu); fenster->setStyleSheet("background-color:white;"); westpart->setStyleSheet("background-color:rgb(245,245,245);"); westpart->setLayout(menu); west->addWidget(westpart); window->addWidget(westpart); /*Center muss hier programmiert werden*/ // centerpart->setStyleSheet("background-color:black;"); center->addWidget(centerpart); /*Layouts dem Widget hinzufügen*/ window->addLayout(west,0,0,0,1); window->addLayout(center,0,1,1,4); fenster->setLayout(window); }