#include "systemsettingwidget.h" #include #include #include #include SystemSettingWidget::SystemSettingWidget(QWidget * parent ) { init(); initLay(); initConnect(); //setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);//无边框 置顶 // setAttribute(Qt::WA_TranslucentBackground);//透明 // QString styleSheet = "background-color:rgb(47, 61, 82);border:1px solid white"; // setStyleSheet(styleSheet); } SystemSettingWidget::~SystemSettingWidget() { } void SystemSettingWidget::init() { this->setStyleSheet("QWidget{background: rgb(47, 61, 82);}"); m_labDes.setText("系统设置"); m_btnRet.setText("< 返回"); m_labDes.setStyleSheet("QLabel{width: 330px;height: 58px;font-family:思源黑体;color:#555555;font-size: 40px;font-weight: 500;}"); m_btnRet.setStyleSheet("QPushButton{width: 160px;height: 31px;font-size: 40px; border:0px ; font-weight: normal;color: #666666;font-family: Source Han Sans;}"); m_NavListWidget.setList(QStringList()<<"填写病例"<<"病例管理"<<"导联方案"<<"参数设置"<<"医院信息", QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter-setting" << "hospital-information"); m_NavListWidget.setStyleSheet("QPushButton{\ background: rgb(51, 71, 75);\ color: white;\ border-radius: 8px;\ border:0px ; \ }\ QPushButton:hover{\ color: black;\ background: rgb(85, 85, 85);\ border-radius: 8px;\ }\ QPushButton:pressed{\ color: black;\ background: rgb(80, 80, 80);\ border-radius: 8px;\ }\ QPushButton:checked{\ color: white;\ background: #0d9ddb;\ border-radius: 8px;\ }"\ "QWidget#NavList1{background-color:rgb(47, 61, 82);}"\ ); } void SystemSettingWidget::initLay() { QHBoxLayout * hlay = new QHBoxLayout; hlay->addSpacing(35); //hlay->setContentsMargins(125,34,34,34); hlay->addWidget(&m_btnRet,1,Qt::AlignLeft); //hlay->addSpacing(589); hlay->addWidget(&m_labDes,9, Qt::AlignHCenter); QWidget * w1 = new QWidget; //0 w1->setFixedHeight(80); w1->setStyleSheet("QWidget{background-color:#ffffff;width: 1920px;height: 100px;}"); w1->setLayout(hlay); QVBoxLayout * vlay = new QVBoxLayout; vlay->addWidget(w1,1); QWidget * w = new QWidget; //w->setStyleSheet("QWidget{background-color:#ffffff;border:1px solid blcak}"); w->setStyleSheet("QWidget{background-color:#ffffff;}"); w->setStyleSheet("QWidget{background: rgb(47, 61, 82);}"); vlay->addWidget(w,9); vlay->setContentsMargins(0,0,0,0); vlay->setSpacing(10); setLayout(vlay); QHBoxLayout * hlayMain = new QHBoxLayout; w ->setLayout(hlayMain); hlayMain->addWidget(&m_NavListWidget,1); hlayMain->addWidget(&m_stackedWidget,9); hlayMain->setContentsMargins(0,0,0,0); } bool SystemSettingWidget::initConnect() { bool bCon = true; bCon = connect(&m_btnRet,SIGNAL(clicked(bool)),this,SLOT(slotClickedChanged())); if(!bCon) { qDebug()<<"connect failed"<(sender()); if(send == nullptr) { return; } emit SigClicked(send->objectName()); QString strName = send->objectName(); qDebug()<objectName()<