oups.....

the first line in english:
>From what I could see the Channel Box is in the first widget.
with this code we just see that everything is in the first Widget.



But it was after I came not to enter following the widget layout and other 
elements pyside


Le mardi 17 mars 2015 09:17:19 UTC+1, Rémi Deletrain a écrit :
>
> De ce que j'ai pu voir la channel Box se trouve dans le premier widget.
>
>
> avec ce code on peu voir que tout est dans le premier Widget.
>
> ---------------------------------------------------------------------------------------------------------------
> from PySide import QtGui, QtCore
> from shiboken import wrapInstance
> from maya.OpenMayaUI import MQtUtil
>
>
> channelbox = wrapInstance(long(MQtUtil.findControl('mainChannelBox')), 
> QtGui.QWidget)
> channelbox_children = channelbox.children()
>
> first_widget = channelbox_children[0]
> first_widget.hide()
>
> ---------------------------------------------------------------------------------------------------------------
>
>
> To review the channelbox
>
> ---------------------------------------------------------------------------------------------------------------
> first_widget.show()
>
> ---------------------------------------------------------------------------------------------------------------
>
>
> If we use this code we see that is in the right widget:
>
> ---------------------------------------------------------------------------------------------------------------
> new_button = QtGui.QPushButton()
> new_layout = QtGui.QVBoxLayout()
> first_widget.setLayout(new_layout)
> new_layout.addWidget(new_button)
>
> new_button.clicked.connect(print_hodor)
>
> def print_hodor():
>     print 'HODOR'
>
> ---------------------------------------------------------------------------------------------------------------
>

-- 
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/9eb88f93-fda7-425a-8ba9-772042a2c990%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to