from PySide import QtGui
import shiboken
import maya.OpenMayaUI as mui
win = shiboken.wrapInstance(long(mui.MQtUtil.mainWindow()), QtGui.QWidget)
print win.findChildren(QtGui.QPushButton)
--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/09b577ae-2418-4438-a281-e09ed411eb3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Glad to hear you solved it.
The whole integration of Qt widgets with the legacy Maya commands api is a bit if a grey area to me. They map them under the hood to whatever the native UI concepts were. It is usually best to try and avoid all UI commands, if you can help it, when you have committed to a Qt interface. Also I see that Qt Designer file support as kind of a gimmick. Or at least a really easy way for someone to transition into Qt in Maya. They have those features for a named button automatically wiring up to named callbacks if you use the right +/- syntax. But ultimately you might come to find that there is only so much you can do with that. Ends up being easier to just write a few lines of Qt UI code directly, and have full access through the Qt API. No UI files or Maya native UI commands to muck with.
--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/baf2787d-75c9-4a76-9419-d55415f368ae%40googlegroups.com.