QDateEdit *dateEdit_date_morning;
dateEdit_date_morning = new QDateEdit(centralWidget);
dateEdit_date_morning->setObjectName(QStringLiteral("dateEdit_date_morning"));
QDateTime qdt1 = QDateTime::currentDateTime();
QString timeStr = qdt1.toString("yyyy-MM-dd");
dateEdit_date_morning->setDateTime(qdt1);
标签:qdt1,morning,QDateEdit,dateEdit,使用,date,QDateTime From: https://www.cnblogs.com/herd/p/17062852.html