This is a total hack, but it might get you started. You can use the lsUI 
command to find any existing maya UI element. From there you can use sip, 
and open maya to get a qtLayout from a maya layout. I don't fully 
understand the sip line, it was taken from some code I wrote several years 
ago. If you're using pyside then I believe you have to use shiboken instead 
of sip. I would prepare yourself for a lot of tedious hacking and 
restarting of maya.

import sip
import PyQt4.QtGui as QtGui
import PyQt4.QtCore as QtCore
import maya.OpenMayaUI as omui

print cmds.lsUI(ed=True)
parentLayout = cmds.editor('polyTexturePlacementPanel1', q=True, p=True)
uvLayout = sip.wrapinstance(long(omui.MQtUtil.findLayout(parentLayout)), 
QtCore.QObject)
uvLayout = uvLayout.children()[0].layout()
qtButton = QtGui.QPushButton('TEST')
uvLayout.addWidget(qtButton)



On Tuesday, February 14, 2017 at 7:37:09 PM UTC-5, I73 wrote:
>
> I'm looking for a way to override the UV editor window to add my own 
> buttons and fields. Is there any way I can do this in QTpython? Or 
> suggestions?
>

-- 
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/e1159d97-59ce-4f30-b4f7-680e07214ec9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to