• 4357阅读
  • 2回复

有办法获取部件相对于屏幕的坐标吗?该部件可能只是主窗体里某个子部件的子部件的子部件... [复制链接]

上一主题 下一主题
离线iiiyyyhhhsss
 

只看楼主 倒序阅读 楼主  发表于: 2010-05-05
如题...
离线paranoid
只看该作者 1楼 发表于: 2010-05-05
QPoint QWidget::mapToGlobal ( const QPoint & pos ) const
Translates the widget coordinate pos to global screen coordinates. For example, mapToGlobal(QPoint(0,0)) would give the global coordinates of the top-left pixel of the widget.
离线iiiyyyhhhsss

只看该作者 2楼 发表于: 2010-05-05
引用第1楼paranoid于2010-05-05 21:55发表的  :
QPoint QWidget::mapToGlobal ( const QPoint & pos ) const
Translates the widget coordinate pos to global screen coordinates. For example, mapToGlobal(QPoint(0,0)) would give the global coordinates of the top-left pixel of the widget.


thanks!
快速回复
限100 字节
 
上一个 下一个