[vtkusers] QVTKRenderWindowInteractor focus policy

Félix C. Morency felix.morency at gmail.com
Wed Aug 29 13:58:46 EDT 2012


Hi all,

The default behaviour of the QVTKRenderWindowInteractor is to steal
the focus when the mouse enters the widget:

    def enterEvent(self, ev):
        if not self.hasFocus():
            self.__oldFocus = self.focusWidget()
            self.setFocus()

Is there a reason for this default behaviour?

I'm in the case where I have multiple subwindows in a MdiArea
rendering QVTKRenderWindowInteractor. Each time the mouse hovers one
of the subwindow, the focus is stolen even if my (Qt) focus policy is
different. If I remove the focus stealing code, things works as
expected.

--
Félix C. Morency, M.Sc.
Plateforme d’analyse et de visualisation d’images
Centre Hospitalier Universitaire de Sherbrooke
Centre de recherche clinique Étienne-Le Bel
Local Z5-3031 | 819.346.1110 ext 16634



More information about the vtkusers mailing list