I use Maya 2016 + PyQt4.8
I create a simple window. It's worked. But i want dialog to be dockable.
import sip
import maya.OpenMayaUI as mui
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4 import uic
import maya.cmds as cmds
#----------------------------------------------------------------------
def getMayaWindow():
ptr = mui.MQtUtil.mainWindow()
return sip.wrapinstance(long(ptr), QObject)
#----------------------------------------------------------------------
class SetTreeOnSplines(QDialog):
def __init__(self, parent=getMayaWindow()):
super(SetTreeOnSplines, self).__init__(parent)
uic.loadUi('X:/tools/Maya/windows/2016/python/setTree.ui', self)
#----------------------------------------------------------------------
# window
def setTree():
formCollect = SetTreeOnSplines()
formCollect.show()
#----------------------------------------------------------------------
# MAIN
setTree()
How to modify script using PyQt to the dialog was dockable?