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.

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top