I don't remember why you would be seeing inconsistent behaviour, but I feel like it is related to the oddness that can happen with Qt widget objectNames and how they are added to layouts, and whether Maya translates them properly to controls, etc, etc.
Anyways, you could just access them through the Qt API instead if you want, and not worry about what Maya does and does not recognize? from PySide import QtGuiimport shiboken import maya.OpenMayaUI as mui win = shiboken.wrapInstance(long(mui.MQtUtil.mainWindow()), QtGui.QWidget)print win.findChildren(QtGui.QPushButton) Justin On Fri, Mar 20, 2015 at 7:03 AM AK Eric <[email protected]> wrote: > Created a .ui file in QtDesigner, it shows up happily in Maya via loadUI. > > I have other Maya code (based on lsUI) that can search through controls > related to buttons, and report stuff like their label, annotation, command, > etc. > However, it *appears *that lsUI ignores anything created from a .ui file. > I know the corresponding Maya controls do exist. For example, I have a > named QPushButton in qtDesigner called 'myButton'. This works in Maya: > > import pymel.core as pm > b = pm.ui.Button('myButton') > print b > print b.getLabel() > > But again, lsUI ignores the existence of the corresponding Maya button. > > Any thoughts on how to say, just list every QPushButton in Maya? I can > sort from there. Or any other ideas? > > thanks > > -- > 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/09b577ae-2418-4438-a281-e09ed411eb3c%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/09b577ae-2418-4438-a281-e09ed411eb3c%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/CAPGFgA0v-EfxbhvU%3DFKrTEGJx%2BmGKNUbUquDYWY8aEYGuX%2ByNA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
