import maya.OpenMayaUI as omui
import maya.cmds as cmds
from shiboken import wrapInstance
ptr = omui.MQtUtil.findControl(cmds.channelBox())
channelBox_widget = wrapInstance(long(ptr), QtGui.QWidget)
layout = channelBox_horizontalLayout
layout.addWidget(channelBox_widget)
转载于:https://my.oschina.net/zsjasper/blog/467955