#ifndef FACTORYMENU_H
#define FACTORYMENU_H
#include <QDialog>
#include <QScrollArea>
#include <QScrollBar>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
namespace Ui {
class FactoryMenu;
}
{
Q_OBJECT
public:
explicit FactoryMenu
(QWidget *parent
= 0);
~FactoryMenu();
private:
Ui::FactoryMenu *ui;
};
#endif // FACTORYMENU_H
#ifndef FACTORYMENU_H
#define FACTORYMENU_H
#include <QDialog>
#include <QScrollArea>
#include <QScrollBar>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
namespace Ui {
class FactoryMenu;
}
class FactoryMenu : public QDialog
{
Q_OBJECT
public:
explicit FactoryMenu(QWidget *parent = 0);
~FactoryMenu();
private:
Ui::FactoryMenu *ui;
QScrollArea *itemsArea;
QGridLayout *layout;
QVBoxLayout *printerLayout;
QVBoxLayout *lcdLayout;
QVBoxLayout *gsm_gprsLayout;
QVBoxLayout *ifdLayout;
QVBoxLayout *samLayout;
QHBoxLayout *mainLayout;
};
#endif // FACTORYMENU_H
To copy to clipboard, switch view to plain text mode
fact.cpp
#include "factorymenu.h"
#include "ui_factorymenu.h"
FactoryMenu
::FactoryMenu(QWidget *parent
) : ui(new Ui::FactoryMenu)
{
ui->setupUi(this);
setWindowFlags(Qt::FramelessWindowHint);
ui->checkBox->setFixedSize(3000,150);
ui->checkBox_2->setFixedSize(50,50);
ui->checkBox_3->setFixedSize(50,50);
ui->checkBox_4->setFixedSize(50,50);
ui->checkBox_5->setFixedSize(50,50);
ui->checkBox_6->setFixedSize(50,50);
ui->checkBox_7->setFixedSize(50,50);
ui->checkBox_8->setFixedSize(50,50);
ui->checkBox_9->setFixedSize(50,50);
ui->checkBox_10->setFixedSize(50,50);
ui->checkBox_11->setFixedSize(50,50);
ui->checkBox_12->setFixedSize(50,50);
mainLayout->addWidget(ui->checkBox);
mainLayout->addWidget(ui->checkBox_2);
mainLayout->addWidget(ui->checkBox_3);
mainLayout->addWidget(ui->checkBox_4);
mainLayout->addWidget(ui->checkBox_5);
mainLayout->addWidget(ui->checkBox_6);
mainLayout->addWidget(ui->checkBox_7);
mainLayout->addWidget(ui->checkBox_8);
mainLayout->addWidget(ui->checkBox_9);
mainLayout->addWidget(ui->checkBox_10);
mainLayout->addWidget(ui->checkBox_11);
mainLayout->addWidget(ui->checkBox_12);
// printerLayout->addWidget(ui->checkBox);
// mainLayout->addLayout(printerLayout);
// mainLayout->addLayout(lcdLayout);
// mainLayout->addLayout(gsm_gprsLayout);
// mainLayout->addLayout(ifdLayout);
// mainLayout->addLayout(samLayout);
itemsArea->setFocusPolicy(Qt::NoFocus);
itemsArea->setWidget(ui->scrollWidget);
itemsArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
itemsArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
// itemsArea->horizontalScrollBar()->setStyleSheet("width: 30px;");
// itemsArea->verticalScrollBar()->setStyleSheet("width: 30px;");
itemsArea->setGeometry(5,20,0,0);
// itemsArea->setFixedSize(695,421);
itemsArea->setFixedSize(670,411);
itemsArea->setLayout(mainLayout);
itemsArea->setStyleSheet(
"QScrollArea {"
"border: 2px solid;"
"border-radius: 5px;"
"Text-align:center;"
"background-color:;""}");
// itemsArea->setStyleSheet("background-image: url(:/images/menu_bg.jpg)");
}
FactoryMenu::~FactoryMenu()
{
delete ui;
}
#include "factorymenu.h"
#include "ui_factorymenu.h"
FactoryMenu::FactoryMenu(QWidget *parent) :
QDialog(parent),
ui(new Ui::FactoryMenu)
{
ui->setupUi(this);
QFrame::WinPanel;
setWindowFlags(Qt::FramelessWindowHint);
ui->checkBox->setFixedSize(3000,150);
ui->checkBox_2->setFixedSize(50,50);
ui->checkBox_3->setFixedSize(50,50);
ui->checkBox_4->setFixedSize(50,50);
ui->checkBox_5->setFixedSize(50,50);
ui->checkBox_6->setFixedSize(50,50);
ui->checkBox_7->setFixedSize(50,50);
ui->checkBox_8->setFixedSize(50,50);
ui->checkBox_9->setFixedSize(50,50);
ui->checkBox_10->setFixedSize(50,50);
ui->checkBox_11->setFixedSize(50,50);
ui->checkBox_12->setFixedSize(50,50);
mainLayout = new QHBoxLayout(ui->scrollWidget);
mainLayout->addWidget(ui->checkBox);
mainLayout->addWidget(ui->checkBox_2);
mainLayout->addWidget(ui->checkBox_3);
mainLayout->addWidget(ui->checkBox_4);
mainLayout->addWidget(ui->checkBox_5);
mainLayout->addWidget(ui->checkBox_6);
mainLayout->addWidget(ui->checkBox_7);
mainLayout->addWidget(ui->checkBox_8);
mainLayout->addWidget(ui->checkBox_9);
mainLayout->addWidget(ui->checkBox_10);
mainLayout->addWidget(ui->checkBox_11);
mainLayout->addWidget(ui->checkBox_12);
// printerLayout->addWidget(ui->checkBox);
// mainLayout->addLayout(printerLayout);
// mainLayout->addLayout(lcdLayout);
// mainLayout->addLayout(gsm_gprsLayout);
// mainLayout->addLayout(ifdLayout);
// mainLayout->addLayout(samLayout);
itemsArea = new QScrollArea(this);
itemsArea->setFocusPolicy(Qt::NoFocus);
itemsArea->setWidget(ui->scrollWidget);
itemsArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
itemsArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
// itemsArea->horizontalScrollBar()->setStyleSheet("width: 30px;");
// itemsArea->verticalScrollBar()->setStyleSheet("width: 30px;");
itemsArea->setGeometry(5,20,0,0);
// itemsArea->setFixedSize(695,421);
itemsArea->setFixedSize(670,411);
itemsArea->setLayout(mainLayout);
itemsArea->setStyleSheet(
"QScrollArea {"
"border: 2px solid;"
"border-radius: 5px;"
"Text-align:center;"
"background-color:;""}");
// itemsArea->setStyleSheet("background-image: url(:/images/menu_bg.jpg)");
}
FactoryMenu::~FactoryMenu()
{
delete ui;
}
To copy to clipboard, switch view to plain text mode
Bookmarks