jianbin.chang常健彬 ce734d1af1 厂家提供原始代码
2025-07-17 08:39:15 +08:00

38 lines
783 B
C++

#include "datee.h"
#include "ui_datee.h"
datee::datee(QWidget *parent)
: QDialog(parent)
, ui(new Ui::datee)
{
ui->setupUi(this);
this->setWindowFlags(Qt::FramelessWindowHint); // 隐藏标题栏
this->setFixedSize(400,300);
}
datee::~datee()
{
delete ui;
}
void datee::on_calendarWidget_selectionChanged()
{
// QDate dt=ui->calendarWidget->selectedDate(); //读取选择的日期时间
// QString str=dt.toString("yyyy-MM-dd");//转换为字符串
// emit kaishi(str);
// this->close();
}
void datee::on_calendarWidget_clicked(const QDate &date)
{
QDate dt=ui->calendarWidget->selectedDate(); //读取选择的日期时间
QString str=dt.toString("yyyy-MM-dd");//转换为字符串
emit kaishi(str);
this->close();
}