展开全部
QTime QTime::currentTime () [static]
This is an overloaded member function, provided for convenience.
Returns the current time as reported by the system clock.
Note that the accuracy depends on the accuracy of the underlying operating system; not all systems provide 1-millisecond accuracy.
----------------------------------------------------------------------------------------------------------------
int QTime::msec () const
Returns the millisecond part (0 to 999) of the time.
See also hour(), minute(), and second().
----------------------------------------------------------------------------------------------------------------
多用用的Qt的帮助文档程序Assitant,很有用的 qthelp://com.trolltech.qt.451/qdoc/qtime.html#currentTime
This is an overloaded member function, provided for convenience.
Returns the current time as reported by the system clock.
Note that the accuracy depends on the accuracy of the underlying operating system; not all systems provide 1-millisecond accuracy.
----------------------------------------------------------------------------------------------------------------
int QTime::msec () const
Returns the millisecond part (0 to 999) of the time.
See also hour(), minute(), and second().
----------------------------------------------------------------------------------------------------------------
多用用的Qt的帮助文档程序Assitant,很有用的 qthelp://com.trolltech.qt.451/qdoc/qtime.html#currentTime
追问
如何使用啊
展开全部
QTime类中有一个函数currentTime(),就是获取当前时间
QTime::currentTime().hour()获取当前小时
QTime::currentTime().minute()获取当前分钟
QTime::currentTime().second()获取当前秒钟
QTime::currentTime().hour()获取当前小时
QTime::currentTime().minute()获取当前分钟
QTime::currentTime().second()获取当前秒钟
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
就是正常使用啊,你用QtCreater打开帮助可以看到 QTime的帮助文档,然后就啥都会了
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询