To try with something like
http://stackoverflow.com/questions/27222016/pyqt-mousepressevent-get-object-that-was-clicked-on
?

Good luck,
Vasilije



On Thu, Aug 4, 2016 at 3:52 PM, <[email protected]> wrote:

>
>
> 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
> <https://groups.google.com/d/msgid/pyqtgraph/4168644f-beb7-413b-b58f-3be9b3be69d9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAD_qyJp8%2B%2B3JtZi2o9Bwj1Rndw%2B%2BTUidQC4tAEbYUStNWx-fEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to