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 . 
http://discourse.techart.online/t/maya-screen-position-of-gui/3055/6

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 , 

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/9029d150-4e98-4f10-b91b-c0939a3efe11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to