#include "tabformwidget.h" #include "ui_tabformwidget.h" #include TabFormWidget::TabFormWidget(QWidget *parent) : QWidget(parent), ui(new Ui::TabFormWidget) { ui->setupUi(this); QPixmap img(":/icons/logo.png"); ui->logo->setPixmap(img.scaledToHeight(33,Qt::SmoothTransformation)); ui->company->setText(QString::fromLocal8Bit("浙江衡玖医疗科技")); ui->lbl_msglogo->setPixmap(QPixmap(":/icons/msg.png").scaledToHeight(26,Qt::SmoothTransformation)); // ui->lbl_patlogo->setPixmap(QPixmap(":/icons/patient.png").scaledToHeight(26,Qt::SmoothTransformation)); ui->spacer_2->setVisible(false); QLabel* hosp = new QLabel(this); hosp->setText(QString::fromLocal8Bit("浙江大学医学院附属第二医院 ")); QLabel* nowDate = new QLabel(this); nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); QLabel* linkIcon = new QLabel(this); linkIcon->setPixmap(QPixmap(":/icons/link_g.png").scaledToHeight(22,Qt::SmoothTransformation)); QLabel* readyIcon = new QLabel(this); readyIcon->setPixmap(QPixmap(":/icons/ready.png").scaledToHeight(22,Qt::SmoothTransformation)); QLabel* lockIcon = new QLabel(this); lockIcon->setPixmap(QPixmap(":/icons/lock.png").scaledToHeight(22,Qt::SmoothTransformation)); QHBoxLayout* layout= new QHBoxLayout(ui->statusBarWidget); layout->setMargin(0); layout->addSpacerItem(new QSpacerItem(10,10,QSizePolicy::Expanding)); layout->addWidget(hosp); layout->addWidget(nowDate); QWidget* spacerLine= new QWidget(this); spacerLine->setFixedWidth(2); spacerLine->setObjectName("spacer_2"); layout->addWidget(spacerLine); layout->addWidget(linkIcon); layout->addWidget(readyIcon); layout->addWidget(lockIcon); } TabFormWidget::~TabFormWidget() { delete ui; }