On Friday, March 28, 2014 at 1:39:30 AM UTC-4, Rakesh Mishra wrote:
>
> Hi Luke,
>
> I want to use Mouse events for TextItem and ArrowItem. but it's not 
> working for me *could * 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *you please help me figure out the  problem, here is my Codeclass 
> MyTextItem(TextItem):    def __init__(self, text='', color=(200,200,200), 
> html=None, anchor=(0,0), border=None, fill=None, angle=0):        
> TextItem.__init__(self, text, color, html, anchor, border, fill, 
> angle)            def mousePressEvent(self, *args, **kwargs):        print 
> "mouse has pressed"        return TextItem.mousePressEvent(self, *args, 
> **kwargs)       def mouseDragEvent(self, ev):        print "Drag Event"   
> class MyArrow(ArrowItem):    def __init__(self, **opts):        
> ArrowItem.__init__(self,**opts)        self.setZValue(-1)    def 
> mousePressEvent(self, *args, **kwargs):        print " mouse clicked 
> "        return ArrowItem.mousePressEvent(self, *args, **kwargs)    def 
> mouseMoveEvent(self, *args, **kwargs):        print "mouse is 
> moving"        return ArrowItem.mouseMoveEvent(self, *args, 
> **kwargs)ThanksRakesh    *
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" 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/pyqtgraph/4168644f-beb7-413b-b58f-3be9b3be69d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to