[image: More message actions]
 17:35 (less than a minute ago) 
  Other recipients:   
  ok.. i got my all buttons from findChildren() function
now iter all buttons to add setContextMenuPolicy and 
customcontextMenuRequested like this

for btn in button:

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


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

customContextMenuRequested only give QPoint Information for Popup Position

becoz mymenu function required btn information also..
how do i get that button information to set my button in this line 
self.menu.exec_(*btn***.mapToGlobal(point))

thanks



-- 
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