Reputation: 1768
Is there a way to create a event to the QGraphicsView created without creating another class and inheriting the QGraphicsView? I want to know if there's a way to do something like that:
ui->gView->AddEvent(click, functionName);
Thanks.
Upvotes: 2
Views: 2490
Reputation: 12832
If you want to handle mouse click event for the view, install an event filter to the view and watch for MouseButtonPress
event.
Upvotes: 2