Suzana
Suzana

Reputation: 4419

How to make PyQt App give up window focus?

I have a python command line script that starts a PyQt Application showing the input of the video device in a little window. Then it starts a curses screen so that the user can control the camera with the keyboard.

After starting the script, the window focus is automatically on the PyQt window. Is there any way to tell PyQt to give up the window focus or curses / the terminal to reclaim it?

I use Linux (Mint Cinnamon) and the solution does not have to be OS independent.

Upvotes: 0

Views: 329

Answers (1)

Achayan
Achayan

Reputation: 5895

You can try with setFocusPolicy here is the documentation. http://pyqt.sourceforge.net/Docs/PyQt4/qwidget.html#setFocusPolicy

Upvotes: 1

Related Questions