QT:如何获得当前执行线程的QThread引用?

tonny79 2003-06-30 10:30:06
就像Java里的Thread.currentThread()一样,可以返回当前执行线程的Thread对象引用。
QT文档里提到的QThread::currentThread()好像不能做到这一点,返回的是QT::HANDLE?
怎么办?
...全文
468 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
icedust 2003-08-12
  • 打赏
  • 举报
回复
Warning: The handle returned by this function is used for internal purposes and should not be used in any application code. On Windows, the returned value is a pseudo handle for the current thread, and it cannot be used for numerical comparison.

have you already seen this warning in QT document?

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧