ok.. i got my all buttons from findChildren() function
now iter all buttons to add setContextMenuPolicy and 
customcontextMenuRequested like this

for btn in button:

self.Button.setContextMenuPolicy(Qt.CustomContextMenu)
self.Button.customContextMenuRequested.connect(self.mymenu)
menu = QtGui.QMenu()
menu.addAction('key')


def mymenu(self, point):
    self.menu.exec_(self.button.mapToGlobal(point)) 


-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to