#include "assistant.h" #include "ui_assistant.h" #include #include assistant::assistant(QWidget *parent) : QMainWindow(parent) , ui(new Ui::assistant) { ui->setupUi(this); QTime time = QTime::currentTime(); ui->label->setText(time.toString("hh:mm")); QDate date = QDate::currentDate(); ui->label_2->setText(date.toString("yyyy年MM月dd日 dddd")); } assistant::~assistant() { delete ui; } void assistant::on_pushButton_clicked() { emit climate_ready(true); qDebug()<<"天气"; } //课程表 void assistant::on_pushButton_3_clicked() { emit class_ready(true); qDebug()<<"课程表"; } //闹钟 void assistant::on_pushButton_2_clicked() { emit alarm_ready(true); qDebug()<<"闹钟"; }