57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
#include <QWidget>
|
|
class sqlControlWidget :public QWidget
|
|
{
|
|
public:
|
|
enum logType
|
|
{
|
|
stdConsle,
|
|
qtConsle
|
|
};
|
|
QVBoxLayout* Layout = new QVBoxLayout(this);
|
|
QHBoxLayout* btnLayout = new QHBoxLayout(this);
|
|
std::vector<gradientButton*>btns;
|
|
QLabel* icon, * Title;
|
|
QStackedWidget* widgets = new QStackedWidget();
|
|
|
|
QLabel* disconnnectedLabel = new QLabel("·þÎñÒÑÀëÏß");
|
|
sqlControlWidget()
|
|
{
|
|
QPalette palette;
|
|
palette.setColor(QPalette::WindowText, Qt::white);
|
|
QFont font("΢ÈíÑźÚ", 24, QFont::Bold);
|
|
QFont font2("΢ÈíÑźÚ", 108, QFont::Bold);
|
|
|
|
widgets->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
widgets->setMaximumSize(9999, 9999);
|
|
|
|
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
this->setMaximumSize(9999, 9999);
|
|
this->setObjectName("sqlControlWidget");
|
|
|
|
Layout->setContentsMargins(0, 0, 0, 0);
|
|
Layout->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
|
|
|
Title = new QLabel(u8"SQL²Ù×÷½çÃæ");
|
|
Title->setFont(font);
|
|
Title->setPalette(palette);
|
|
Title->setAlignment(Qt::AlignLeft);
|
|
|
|
disconnnectedLabel->setFont(font2);
|
|
disconnnectedLabel->setPalette(palette);
|
|
disconnnectedLabel->setAlignment(Qt::AlignCenter);
|
|
|
|
Layout->addWidget(Title);
|
|
|
|
btnLayout->setContentsMargins(0, 0, 0, 0);
|
|
btnLayout->setAlignment(Qt::AlignLeft);
|
|
|
|
btnLayout->addWidget(disconnnectedLabel);
|
|
|
|
Layout->addLayout(btnLayout);
|
|
|
|
|
|
}
|
|
|
|
};
|
|
#pragma once
|
|
#pragma once |