--
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/0e752d10-1f3e-4ab9-b380-93c55f9e26f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You can try looking them up through Qt (MQtUtil) and using their signals or events.
Thank for reply
Yes, ofc, its possible. But I just want to try different way :D
--
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/9338dbc4-bac7-4aca-888a-b2203aa40518%40googlegroups.com.
You could try locating their QWidget instance and monkey-patch the method responsible for updating it. :)
# E.g.
def setText(self, text):
super(...)
print "Gotcha!
some_widget_you_found.setText = setText
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2Xf%2B3bZBAYa-VNNDbGGLcjgOwQK5LV78kkGGOctru-xA%40mail.gmail.com.
On 20/08/2014 7:44 AM, "Marcus Ottosson" <konstr...@gmail.com> wrote:
>
> You could try locating their QWidget instance and monkey-patch the method responsible for updating it. :)
>
> # E.g.
> def setText(self, text):
> super(...)
> print "Gotcha!
>
> some_widget_you_found.setText = setText
>
>
I think that would only work for virtual methods of the widget, and also probably not have any effect on the underlying Qt in Maya since it wouldn't know about the virtual method of your local python object.
It does work when you own the widgets in your app.
>
>
> On 19 August 2014 21:21, Justin Israel <justin...@gmail.com> wrote:
>>
>> You can try looking them up through Qt (MQtUtil) and using their signals or events.
>>
>> On 20/08/2014 7:11 AM, "illunara" <cb.il...@gmail.com> wrote:
>>>
>>> Thank for reply
>>> Yes, ofc, its possible. But I just want to try different way :D
>>>
>>> --
>>> 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/9338dbc4-bac7-4aca-888a-b2203aa40518%40googlegroups.com.
>>> 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 python_inside_m...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2Xf%2B3bZBAYa-VNNDbGGLcjgOwQK5LV78kkGGOctru-xA%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Marcus Ottosson
> konstr...@gmail.com
>
> --
> 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/CAFRtmODb0%2Bo0%3DrPFjta2RmeUZ30HB%3DDakSy6_yskJy8T8B5Nkw%40mail.gmail.com.
Eh, i thought Maya’s primitive UI build using MEL (Panel, slider, field…..)?
That is true, but MEL is using Qt. :)
If we got the element’s name, then we can use Maya’s command to edit it using flags to do things we want.
Or, the QObject name.
object_name = my_widget.objectName()
my_widget = main_window.findChild(object_name)
I think that would only work for virtual methods of the widget, and also probably not have any effect on the underlying Qt in Maya since it wouldn’t know about the virtual method of your local python object.
Monkey-patching probably wouldn’t work, that’s true. But installing an event-filter might.
http://qt-project.org/doc/qt-4.8/qobject.html#installEventFilter
my_widget.installEventFilter()
Eh, i thought Maya's primitive UI build using MEL (Panel, slider, field.....)? I used QT before, but that's complete different story, right?
If we got the element's name, then we can use Maya's command to edit it using flags to do things we want.
--
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/CAMCvD%2BFe8aA1jKg-gOjBJuQCGPhYV7iBqc7J9m10TxQMWis2jQ%40mail.gmail.com.
Oh Wow, never know that MEL is using QT O_O Still vague to me, but i will give it a try :D 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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMCvD%2BGtz3erW2ju9q7V%2BiYzS%3Dp09Cc_58U4MUiU12oJFkrOtA%40mail.gmail.com.