UpLowLimp/ZBD_IIIDL_S_Project/Src/PopDialog/Prescriptiondialog.cpp

44 lines
892 B
C++
Raw Normal View History

2024-11-25 17:15:44 +08:00
#include "Prescriptiondialog.h"
#include "ui_Prescriptiondialog.h"
#include <QPainter>
PrescriptionDialog::PrescriptionDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::PrescriptionDialog)
{
ui->setupUi(this);
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
setAttribute(Qt::WA_TranslucentBackground,true);
}
PrescriptionDialog::~PrescriptionDialog()
{
delete ui;
}
void PrescriptionDialog::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
QPainter painter(this);
painter.fillRect(rect(),QColor(0,0,0,100));
}
void PrescriptionDialog::changeEvent(QEvent *event)
{
switch (event->type())
{
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
QWidget::changeEvent(event);
break;
}
}
void PrescriptionDialog::on_confirm_Btn_clicked()
{
this->close();
}