QDateEdit控件 QDateTimeEdit控件 修改格式: ui->dateTimeEdit->setDisplayFormat("yyyy-MM-dd hh:mm:ss"); //上述格式为年月日,时分秒 QCalendarWidget控件