Focus can disappear when hiding/closing a dock that has the focus

Issue #637 closed
Felix Krull created an issue

Split off from issue #465 which deals with a similar, but separate issue.


Alessandro Portale wrote:

Thanks you for the screen shot and explanations. And indeed, I can reproduce that when e.g.: - I open constants then functions - I click into the search field of the functions - I close the functions tab

...the cursor is gone. There are other constelletions where the cursor/focus can be in a tool window which is in the back, so that the input (e.g. 999) lands there. Helder: Should we try to avoid that?

Helder wrote:

I've tried quite a few different hacks to fix these corners cases. Whenever I think I found a solution, I managed to get the broken behavior at a random try. I'm convinced there is some sort of Qt bug here.

(Helder: you were referring to this particular problem where the focus can disappear sometimes, right?)


I think this can be solved comprehensively with QDockWidget::visibilityChanged since the only controls that can have keyboard focus and can go away are dock widgets. It seems the only place the focus can safely and consistently go is to the editor...

Comments (4)

  1. Log in to comment