Adding maya layouts into Qt window

hi all,

i want to add maya layouts e.g. formLayout into Qt Widget, how can i ?

thanks and regards

mossin

in detail,

i want to add a layout with it’s children into qt made window.

renderView would be the parent of Qt Window

and i found MQtUtil Class will help in doing that

so i m trying with some basic scripted window (a columnLayout with some

buttons)

i m going through that but it’s hard actually

i m getting this error

in method ‘MQtUtil_getLayoutChildren’, argument 1 of type ‘QWidget const *’

any idea?

regards
mossin

i got the solution

self.setCentralWidget(getMelWindow())

where getMelWindow() routine query the mel Layout

def getMelWindow():
ptrLayout = mui.MQtUtil.findLayout(“myWin|clmn”)
return sip.wrapinstance(long(ptrLayout), QtGui.QWidget)

i m still working on it, if you guys are having different ideas or already done this before, please let me know

regards
mossin

i m getting refreshing related issues, e.g. when i open widget first time, it takes layout from mel window.
but for second time it doesnt take layout from mel window.

may be it is because of pointer ptrLayout (correct me if i m worng)

regards
mossin