from PySide2 import QtCore, QtGui, QtWidgetsfrom shiboken2 import wrapInstance
import maya.OpenMayaUI as omui
def maya_main_window(): main_window_ptr = omui.MQtUtil.mainWindow() return wrapInstance(long(main_window_ptr), QtWidgets.QWidget) class gSubmission(QtWidgets.QMainWindow): def __init__(self, parent=maya_main_window()): super(gSubmission, self).__init__(parent) self.setWindowTitle("Temp") if __name__ == "__main__": try: ui.close() except: pass ui = gSubmission() ui.show() --
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/678a5041-d94d-4403-bb03-78ef3b3d6db4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA01dFt4wSwNKADZ7yG7x40yF9vpuTgN3jjxDQ8ra7fYWw%40mail.gmail.com.