If you are handling mouseReleaseEvent in an other widget and don't call
parent widget's mouseReleaseEvent, event won't be propageted to child
widgets.
E.g: CustomWidget inherits QWidget
*CustomWidget::mouseReleaseEvent(QMouseEvent *event)*
*{*
* // Do your work*
* QWidget::mouseReleaseEvent(event);*
*}*
I think same thing applies to QGraphicsItems.
On Mon, Dec 17, 2012 at 2:52 PM, Emmanuel Bourgerie <[email protected]>wrote:
> Hi !
>
> I have an issue with a subclassed QGraphicsItem, I try to re-implement
> mouseReleaseEvent but it is never triggered.
>
> I read on Google that I wasn't the first one having this issue, but I
> found several leads and no one did work.
>
> So, I did setAcceptHoverEvents(true); in the constructor to handle hover
> events (and it works), no problem with mousePressEvent but I cannot locate
> what is wrong with mouseReleaseEvent.
> I accepted the event in mousePressEvent (it didn't change a thing), I
> tried to make the item selectable, movable, focusable, didn't work.
>
> Is there a specific flag or function in the GraphicsScene I forgot ?
>
> Thanks,
>
> _______________________________________________
> Interest mailing list
> [email protected]
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest