Discussion:
[Maya-Python] MayaQWidgetDockableMixin dockCloseEventTriggered not called
kiteh
2018-11-05 20:16:13 UTC
Permalink
Hi all,

I am having some issues with MayaQWidgetDockableMixin, in which it is a
QWidget.
When I am testing it out in Maya 2017, I used the signal
`dockCloseEventTriggered` where a function will be called to save the
relevant options I have made within my GUI by using QSettings. The
settings are able to populate correctly when I am relaunching my tool.

However when I am testing this out in Maya 2018, it seems that the
function/ `*dockCloseEventTriggered*` is not being called. As such, nothing
is saved/ loaded, and the .conf file is also not created.

Pardon me for not posting any codes as it consists of quite several scripts
but wondering if anyone has encounter this/ if there is a way to check if
the signal or trigger does indeed works?
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7176339b-d681-45f4-90b2-42a78f2248f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
kiteh
2018-11-05 22:00:07 UTC
Permalink
I managed to have find a resolution.
Instead of using `dockCloseEventTriggered`, using of `closeEvent` seems to
have resolve it.

I have to write my UI create code to include something as follows:
self.ui.closeEvent = self.closeEvent

And this seems to be picking up in both Maya 2017 and 2018. Or as one of my
co-worker is telling me that the `MayaQWidgetDockableMixin` I am using
could be a custom build since my company may have rewritten certain
portions to conform it to other tools.
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ef562723-e2ea-4a44-904c-85339bfb80bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
kiteh
2018-11-06 01:46:23 UTC
Permalink
Actually I was wrong - I had thought that using `self.closeEvent` may works
in Maya 2018, but turns out it is not.

Need any insights on this. Much appreciated in advance!
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8a39e11f-a608-4047-99e0-3b115573b1cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...