QT Sleep 实现
2015-06-01 17:06
323 查看
#ifdef Q_OS_WIN #include <windows.h> #else #include <time.h> #endif void Wait(ulWaitMs) { #ifdef Q_OS_WIN Sleep(ulWaitMs); #else struct timespec ts = { ulWaitMs/ 1000, (ulWaitMs% 1000) * 1000 * 1000 }; nanosleep(&ts, NULL); #endif }
相关文章推荐
- 在QT下测试openni+opencv,显示采集的深度图和彩色图
- QT线程退出
- Qt开发笔记
- Qt编程之对QGraphicsItem点击右键弹出菜单
- MQTT协议之websocket方式发布接收消息
- qt 文件的写入与读出
- qt 将textEdit内容显示到textBrowser
- qt 5 视频播放 ---转载自正文链接
- Qt 模仿苹果状态切换按钮
- qt 将登陆界面的内容传到主界面
- Qt学习之路(21): event()
- Qt学习之路(22): 事件过滤器
- Qt学习之路(23): 自定义事件
- Qt学习之路(24): QPainter
- Qt学习之路(25): QPainter(续)
- Qt学习之路(26): 反走样
- Qt学习之路(27): 渐变填充
- Qt学习之路(28): 坐标变换
- Qt学习之路(29): 绘图设备
- Qt学习之路(30): Graphics View Framework