I have a class "SceneWindow" which inherits QGraphicsScene. I have a mouse move event which emits the current x and y position of the mouse on the scene.
In my main window class I have four graphicsview which I use to display different images. I have created four objects of the same graphicsscene class to set on the view. I want to detect on which of the graphics view my mouse currently is. How do I do it? I tried using event filter in main class to detect the view but it is not helping. I tried it in the following way:
bool MainWindow::eventFilter(QObject *f_object, QEvent *f_event)
{
if(f_object == graphicsView && f_event->type() == QEvent::MouseMove)
{
qDebug() << "I am in Scene 1";
}
Can someone please give a solution to this?
Thank You.