Exemple #1
0
    def contextMenuEvent(self, event):
        idx = self.indexAt(event.pos())
        layer = self.model()[idx.row()]

        layercontextmenu( layer, self.mapToGlobal(event.pos()), self )
Exemple #2
0
    def contextMenuEvent(self, event):
        idx = self.indexAt(event.pos())
        layer = self.model()[idx.row()]
        #print "Context menu for layer '%s'" % layer.name

        layercontextmenu( layer, self.mapToGlobal(event.pos()), self )
Exemple #3
0
 def onContext(self, pos):        
     idx = self.indexAt(pos)
     layer = self.model()[idx.row()]
     print "Context menu for layer '%s'" % layer.name
     
     layercontextmenu( layer, self.mapToGlobal(pos), self )