Skip to content
Advertisement

Tag: focus

Determine the element which previously had focus?

In Java a FocusEvent has a method getOppositeComponent() which is where the focus came from or went to. In PyQt5 is there any way to find what previously had focus when overriding focusInEvent? As explained in a note, I want to be able to start an edit session automatically when the table view gets focus, end an edit session by

How to make a Tkinter window jump to the front?

How do I get a Tkinter application to jump to the front? Currently, the window appears behind all my other windows and doesn’t get focus. Is there some method I should be calling? Answer Assuming you mean your application windows when you say “my other windows”, you can use the lift() method on a Toplevel or Tk: If you want

Advertisement