I have the following code in PySide in Maya:
import maya.cmds as cmds
from PySide import QtCore, QtGui
import maya.OpenMayaUI as mui
import shiboken
def getMayaWindow():
pointer = mui.MQtUtil.mainWindow()
return shiboken.wrapInstance(long(pointer), QtGui.QWidget)
class MainWindowUI(QtGui.QDialog):
parent = getMayaWindow()
def __init__(self, parent=parent):
super(MainWindowUI, self).__init__(parent)
self.initUI()
def initUI(self):
# layout
QVlayout = QtGui.QVBoxLayout()
self.setLayout(QVlayout)
#check for open Window first
wnName = "WindowTest01"
if cmds.window(wnName, exists =1):
cmds.deleteUI(wnName, wnd=True)
self.setObjectName(wnName)
self.setWindowTitle("WindowTest01")
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.setStyleSheet("background-color: transparent; border-radius: 100px;")
self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
self.setMinimumSize(560,800)
self.setMaximumSize(560,800)
self.setWindowOpacity(0.9)
self.show()
class TabsMaker():
pass
class buttonsMaker():
pass
if __name__ == "__main__" :
MainWindowUI()
I need the window to be without borders, and adjust the transparency, when I do I load a screen with the measures of the established but with all distorted inside, without being able to move it, without closing button. How can I achieve this?