获取本地系统的时间和日期。(date()和time())。
QLabel *labelDateTime=new QLabel(this);//用于显示时间
QDateTime *DateTime=new QDateTime(QDateTime::currentDateTime());//获取时间
labelDateTime->setText(DateTime->date().toString());//显示
获取本地系统的时间和日期。(date()和time())。
QLabel *labelDateTime=new QLabel(this);//用于显示时间
QDateTime *DateTime=new QDateTime(QDateTime::currentDateTime());//获取时间
labelDateTime->setText(DateTime->date().toString());//显示