Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top