import pymel.core as pmimport PySide.shiboken as shibokenfrom PySide.QtCore import *from PySide.QtGui import *from maya.OpenMayaUI import MQtUtildef getMayaMainWindow(*args, **kwargs): '''@return: QtGui.QMainWindow instance of the top level maya window ''' mainWindow = MQtUtil.mainWindow() return shiboken.wrapInstance(long(mainWindow), QMainWindow) if mainWindow else Noneclass Test(QMainWindow): def __init__(self, *args, **kwargs): super(Test, self).__init__(getMayaMainWindow()) self.setWindowTitle('Test') self.show()
if __name__ == '__main__':
test = Test()
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。