Here are the examples of the python api PyQt4.QtGui.QApplication.widgetAt taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: Qt-Python-Binding-Examples Source File: popup_menu_in_treeview.py
Function: context_menu_event
Function: context_menu_event
def contextMenuEvent(self, event):
point = self.mapToGlobal(event.pos())
widget = QtGui.QApplication.widgetAt(point)
print "widget:", widget
act = self.popup_menu.exec_(point)
if act == self.item_add_act:
print "item add clicked"
return super(Demo, self).contextMenuEvent(event)