pymel.core.windows.toQtObject

toQtObject(mayaName)

Given the name of a Maya UI element of any type, return the corresponding QWidget or QAction. If the object does not exist, returns None

When using this function you don’t need to specify whether UI type is a control, layout, window, or menuItem, the first match – in that order – will be returned. If you have the full path to a UI object this should always be correct, however, if you only have the short name of the UI object, consider using one of the more specific variants: toQtControl, toQtLayout, toQtWindow, or toQtMenuItem.

Note

Requires PySide