There isn't any formal kind of global "flush" for Qt. If you are leaking memory then you would need to fix that. Since Maya is a persistent environment for all of the tools you run, tools have to take care to clean themselves up. With Qt, even more so. Because if you create widgets with parent to the main window, they don't get deleted unless you do it. An example is a dialog window. When you make a dialog and parent it to Maya's main window, and then close the dialog, you are most likely leaking it if you are just creating a new one from scratch each time.
For any widget you have widget.deleteLater() which will delete it once control gets back to the event loop. If you are not keeping a global ref to your dialog to reshow each time, and your dialog is being parented to Maya, then you can use QtCore.Qt.WA_DeleteOnClose and set it with dialog.setAttribute() This will tell the dialog to delete when you close it. All widgets in the parent child chain will delete. http://qt-project.org/doc/qt-4.8/qt.html#WidgetAttribute-enum This may not be exactly the problem you are having so you might need to explain the unwanted behavior a bit more On 16/07/2014 4:22 AM, "md" <[email protected]> wrote: > Is there a way to flushing all prior QT instances from memory when > developing PySide/Qt scripts for Maya? > > I am constantly exiting Maya and reloading it when my forms don't seem to > refresh properly. > > Thanks > > M > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/ff0065a9-e32e-4cac-b163-d9103c9a1f0f%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/ff0065a9-e32e-4cac-b163-d9103c9a1f0f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0trNa%3Djj8ujws8M0XJA4usAO_Wccq9PaHCn2%2BGmKCWhw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
