Hi ,
It's there a solution to get maya UI position in screen space .
''' UI
import maya.cmds as mc
mc.window()
mc.columnLayout(adj = 1)
mc.button('testButton')
mc.shwWindow()
'''
There is a discussion about the windows UI in screen space .
And I tried it for a button UI , it seems a local position under the layout :
'''
import maya.OpentMayaUI as mui
from PySide2 import QtWdigets
import shiboken2
prt = mui.MQtUtil.findControl('testButton')
qwidget = shiboken2.wrapInstance(long(ptr) , QtWidgets.QWdiget)
print qwidget.x()
print qwidget.y()
'''
Thanks ,