I’m also experiencing this issue, and changing the inheritance order didn’t solve it for me. The docstring of the mixin has this to say:
C:\Program Files\Autodesk\Maya2017\Python\Lib\site-packages\maya\app\general\mayaMixin.py
class MayaQWidgetDockableMixin(MayaQWidgetBaseMixin):
'''
Handle Maya dockable actions controlled with the show() function.
Integration Notes:
Inheritance ordering: This class must be placed *BEFORE* the Qt class for proper execution
This is needed to workaround a bug where PyQt/PySide does not call super() in its own __init__ functions
Example:
class MyQWidget(MayaQWidgetDockableMixin, QPushButton):
def __init__(self, parent=None):
super(MyQWidget, self).__init__(parent=parent)
self.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred )
self.setText('Push Me')
'''
I did however find a “solution” here:
Which was this:
def maya2017_ui_fix():
"""Fix unresponsive GUI in Dock and Menu from Maya 2017 onwards"""
from maya import cmds, OpenMayaUI as omui
from Qt import QtCompat, QtWidgets
main_window_ptr = omui.MQtUtil.mainWindow()
mayaWid = QtCompat.wrapInstance(long(main_window_ptr), QtWidgets.QWidget)
class _(MayaQWidgetDockableMixin, QtWidgets.QDialog):
def __del__(self, *args, **kwargs):
pass
def __init__(self, parent=None):
QtWidgets.QDialog.__init__(self, parent)
dummy = _(mayaWid)
dummy.setObjectName("DockingDummyWindow")
name = dummy.objectName() + "WorkspaceControl"
dummy.show(dockable=True, area="right", floating=False)
cmds.workspaceControl(name, edit=True,
tabToControl=["AttributeEditor", -1],
widthProperty="preferred",
minimumWidth=420)
cmds.workspaceControl(name, edit=True, close=True)
cmds.deleteUI(name, control=True)
Which when run first tricks subsequent docs to work appropriately. It does however have the unfortunate consequence of flickering the GUI and sometimes shifting some items in the layout, so will keep an eye on this thread for less intrusive workarounds.