Solved Active QGraphicsView from QGraphicsScene
-
Consider a QGraphicsscene that has multiple views. I wanted to get the view that is currently in focus(i mean a user is currently interacting with). Also is there any way to get current paint engine details from active QGraphicsView Object.
QGraphicsScene::views() will give me a list but does the active view will be always at 0th position ?
-
You dont need your scene for this. Just check which view has focus.
QGraphicsView * view view->hasFocus();
or
QApplication::focusWidget();