Hey Kyle, thanks for the reply! I'm using C++ but looking at the python it 
seems I can use this example. I'm just glad its not using cmds and actually 
QT!!! I'll post my working code to help others out. 


On Tuesday, February 28, 2017 at 5:57:04 AM UTC-8, Kyle Burris wrote:
>
> 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/638d5240-dea6-46aa-97e5-af7fdc7c4e40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to