Hi. This is how I fix it, thanks to you guys. I dont know why I was creating a 
function for the button:

class CustomButtom(QtGui.QPushButton):
    def __init__(self, parentWindow, buttonName, windowsList, icon):
        super(CustomButtom, self).__init__(parentWindow)
        
        #self.icon = QtGui.QIcon(":/clusterHandle.svg")
        QtIcon = QtGui.QIcon(icon)
        self.setParent = parentWindow
        self.setObjectName(buttonName)
        self.setGeometry(QtCore.QRect(0, 0, 50, 50))
        self.setIcon(QtIcon)
        self.setIconSize(QSize(45, 45))
        self.clicked.connect(partial(self.closeWindow, windowsList))
        self.setMouseTracking(1)
        self.setStyleSheet("border: none;")

thanks again

-- 
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/4864dffa-cb76-4150-b53f-d37cd9dacb52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to