Qt获取系统时间 //.h #include<QDateTime> #include<QTimer> public: QTimer *myTimer; //.cpp #include<QTime> myTimer=new QTimer(this