在windows下,QWidget类的WId winId () const 成员函数返回的就是窗口句柄. 转自:https://blog.youkuaiyun.com/LaoWu_/article/details/5814191