Hello Guys, I have a query regarding shelf button of UI i have created a ui with pyside2 and put it on the maya shelf i click to open the ui it works well as i do it for the second time it opens same UI for the second time so is there a better way to write a main().close would be very grateful if an example is provided
i found a reference on http://nathanhorne.com/pyqt-and-maya-2011/ def main(): global win try: win.close() except: pass win = MyWindowClass() win.show() Thank You. -- 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/da0be90d-88fd-4e22-a25e-67c9e024d3d9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.