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/22532216-3880-456c-ba7d-fc707babe148%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to