[Interest] Getting QGraphicsView from within a mouse event
giuseppe.dangelo at kdab.com
Mon Jun 15 02:20:08 CEST 2020
Il 15/06/20 00:50, Nicholas Yue ha scritto:
> I understand that a QGraphicsScene may be view by multiple QGraphicsView
> When handling a mouse event, what is the Qt way to find out from
> which view the event was from ?
If you're handling a QGraphicsSceneEvent of some sort, its widget() will
give you the viewport() of the view where the event originated, IIRC.
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4329 bytes
Desc: Firma crittografica S/MIME
More information about the Interest