获取maya的QApplication


>>> from PySide2 import QtWidgets
>>> import shiboken2
>>> app2 = shiboken2.wrapInstance(shiboken2.getCppPointer(QtWidgets.QApplication.instance())[0], QtWidgets.QApplication)
>>> app2
<PySide2.QtWidgets.QApplication object at 0x0000020A13D67F08>

评论
  目录