diff --git a/Code/Application/mvdMainWindow.cxx b/Code/Application/mvdMainWindow.cxx index cbae7238c1dbf0632bed1d15e6c2efb0e0daebf3..90ec0767f6ebc61d0b370882ced2a92f75837641 100644 --- a/Code/Application/mvdMainWindow.cxx +++ b/Code/Application/mvdMainWindow.cxx @@ -96,9 +96,6 @@ MainWindow ) ); - // grab the keyboard notifications in this widget - centralWidget()->grabKeyboard(); - // instanciate the Ql manipulator here to be able to connect // its signals to the centralWidget manipulator slots m_QLViewManipulator = new QuicklookViewManipulator(); diff --git a/Code/Common/mvdGLImageWidget.cxx b/Code/Common/mvdGLImageWidget.cxx index 5ea25d03ded34e06f27513be1a6dbea26ab1905f..c465e83d74f1b8ac243d3e3835357d8cbcfb2832 100644 --- a/Code/Common/mvdGLImageWidget.cxx +++ b/Code/Common/mvdGLImageWidget.cxx @@ -61,6 +61,8 @@ GLImageWidget m_ImageModelRenderer( NULL ), m_ImageModel( NULL ) { + // Set focus policy so that the widget gets the focus if it is clicked + setFocusPolicy(Qt::StrongFocus); Initialize(manipulator, renderer); } @@ -77,6 +79,9 @@ GLImageWidget m_ImageModelRenderer( NULL ), m_ImageModel( NULL ) { + // Set focus policy so that the widget gets the focus if it is clicked + setFocusPolicy(Qt::StrongFocus); + Initialize(manipulator, renderer); } @@ -93,6 +98,9 @@ GLImageWidget m_ImageModelRenderer( NULL ), m_ImageModel( NULL ) { + // Set focus policy so that the widget gets the focus if it is clicked + setFocusPolicy(Qt::StrongFocus); + Initialize(manipulator, renderer); }