Oh man! .allWidgets(). What a great/terrible idea.

I know right. :) I discovered it not too long ago and have found it handy
for debugging, but not much else. There’s also .topLevelWidgets() which can
be a handy replacement for getting a handle to the Maya window, independent
of both PyQt and PySide specifics, as discussed here
<https://groups.google.com/forum/#!searchin/python_inside_maya/toplevelwidgets/python_inside_maya/I-sufW_HCjo/EzXWNVQDisYJ>
.

from PySide import QtGui
widgets = dict((w.objectName(), w) for w in
QtGui.QApplication.topLevelWidgets())
window = widgets['MayaWindow']

 .. I’m not sure if this is going off topic, but you could try to implement
something at the windows manager level.

There’s really no need, PySide is cross-platform too and something like
iographica could be implemented using a similar approach to the above.
​

On 20 November 2014 08:17, Jesse Kretschmer <[email protected]> wrote:

> On Wed Nov 19 2014 at 11:59:20 PM Marcus Ottosson <[email protected]>
> wrote:
>>
>>  You could use QApplication.allWidgets()
>>
> Oh man! .allWidgets(). What a great/terrible idea. It's definitely easier
> to implement than the recursive function that I had suggested off-hand.
>
> .. I'm not sure if this is going off topic, but you could try to implement
> something at the windows manager level.
>
> In particular, this project came through my feed some time ago:
> http://iographica.com/. It is cross-platform and they offer source*. *Most
> importantly, it makes pretty pictures, which is all we really care about
> anyhow, right?
>
> --
> 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/CANESWi2uk4DsQ%3D9zMi_q01t%3De-mmHf-K9d5Mun2XDoCdoHgXGg%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CANESWi2uk4DsQ%3D9zMi_q01t%3De-mmHf-K9d5Mun2XDoCdoHgXGg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
[email protected]

-- 
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/CAFRtmOBKBHVcY7zDDGY95H_s5FDQP66FE_YM4OdVghMmgzKujQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to