Hi, I'm trying to execute a function when user clicks a swatchDisplayPort that's inside a Qt-window.
Currently my code looks something like this: swatch_name = cmds.swatchDisplayPort(rs=64, wh=[64, 64], sn="lambert1") ptr = OpenMayaUI.MQtUtil.findControl(swatch_name) swatch_widget = shiboken.wrapInstance(long(ptr), QtGui.QWidget) swatch_widget.mousePressEvent = my_func I can get this to work on other Qt-objects (ie. labels) but not with swatchDisplayPorts. Any help would be greatly appreciated. Cheers, Risto -- 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/CA%2B5uDBZ2J8vPY%3Do6i3MgsZz5u_GzUwM3T4jU0wYAS5zehhMk9Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
