[Interest] Is there a way to figure out QGraphicsSceneEvent's sender?

Dmitrii Volosnykh dmitrii.volosnykh at gmail.com
Wed Apr 23 11:15:39 CEST 2014


I am re-sending QGraphicsSceneMouseEvents from children to parent and would
like to know which child it came from. So (as per semantic) the so-called
sender is not widget, but QGraphicsItem. I was thinking that QGraphicsItems
may send events between each other, but apparently they are not.

Now I am looking towards QGraphicsItemGroup, but I am not sure if it fits
my needs: I have a PathItem (parent) and a set of PointItems connected
sequentially by Line- or ArcItems. Docs say that group's children events
are merged. I wounder: to what extent? Am I able to distinguish events
targeted to different children originally, before the merge happened?


2014-04-23 13:05 GMT+04:00 Jonathan Greig <redteam316 at gmail.com>:

> Whats wrong with using QGraphicsSceneEvent::widget() ?
>
>
> On Wed, Apr 23, 2014 at 3:48 AM, Dmitrii Volosnykh <
> dmitrii.volosnykh at gmail.com> wrote:
>
>> See subject. I mean something similar to QObject's sender() method.
>>
>> Regards.
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140423/8086ec62/attachment.html>


More information about the Interest mailing list